home *** CD-ROM | disk | FTP | other *** search
Unknown | 1999-11-02 | 20.3 KB |
open in:
MacOS 8.1
|
Win98
|
DOS
view JSON data
|
view as text
This file was not able to be converted.
This format is not currently supported by dexvert.
Confidence | Program | Detection | Match Type | Support
|
---|
100%
| file
| data
| default
|
|
hex view+--------+-------------------------+-------------------------+--------+--------+
|00000000| 00 00 00 00 00 00 00 00 | 68 c4 02 2f 2f 2d 2d 2d |........|h..//---|
|00000010| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00000020| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00000030| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00000040| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00000050| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 0d 0a 2f 2f 20 |--------|---..// |
|00000060| 4d 61 73 68 61 64 61 72 | 4d 61 6e 61 67 65 72 2e |Mashadar|Manager.|
|00000070| 75 63 0d 0a 2f 2f 20 24 | 41 75 74 68 6f 72 3a 20 |uc..// $|Author: |
|00000080| 4d 66 6f 78 20 24 0d 0a | 2f 2f 20 24 44 61 74 65 |Mfox $..|// $Date|
|00000090| 3a 20 31 30 2f 32 36 2f | 39 39 20 35 3a 34 32 70 |: 10/26/|99 5:42p|
|000000a0| 20 24 0d 0a 2f 2f 20 24 | 52 65 76 69 73 69 6f 6e | $..// $|Revision|
|000000b0| 3a 20 31 20 24 0d 0a 2f | 2f 0d 0a 2f 2f 20 44 65 |: 1 $../|/..// De|
|000000c0| 73 63 72 69 70 74 69 6f | 6e 3a 09 0d 0a 2f 2f 2d |scriptio|n:...//-|
|000000d0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000000e0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000000f0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00000100| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00000110| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 0d 0a 2f |--------|-----../|
|00000120| 2f 20 48 6f 77 20 74 6f | 20 75 73 65 20 74 68 69 |/ How to| use thi|
|00000130| 73 20 63 6c 61 73 73 3a | 0d 0a 2f 2f 20 0d 0a 2f |s class:|..// ../|
|00000140| 2f 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |/-------|--------|
|00000150| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00000160| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00000170| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00000180| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 0d |--------|-------.|
|00000190| 0a 63 6c 61 73 73 20 4d | 61 73 68 61 64 61 72 4d |.class M|ashadarM|
|000001a0| 61 6e 61 67 65 72 20 65 | 78 70 61 6e 64 73 20 49 |anager e|xpands I|
|000001b0| 6e 66 6f 3b 0d 0a 0d 0a | 2f 2f 20 49 6e 69 74 69 |nfo;....|// Initi|
|000001c0| 61 6c 20 68 65 61 6c 74 | 68 20 66 6f 72 20 61 20 |al healt|h for a |
|000001d0| 4d 61 73 68 61 64 61 72 | 2e 0d 0a 76 61 72 28 29 |Mashadar|...var()|
|000001e0| 20 69 6e 74 20 4d 61 73 | 68 61 64 61 72 4d 61 78 | int Mas|hadarMax|
|000001f0| 48 65 61 6c 74 68 3b 0d | 0a 76 61 72 28 29 20 69 |Health;.|.var() i|
|00000200| 6e 74 20 4d 61 73 68 61 | 64 61 72 4d 69 6e 48 65 |nt Masha|darMinHe|
|00000210| 61 6c 74 68 3b 0d 0a 0d | 0a 73 74 72 75 63 74 20 |alth;...|.struct |
|00000220| 4d 61 73 68 61 64 61 72 | 49 6e 66 6f 0d 0a 7b 0d |Mashadar|Info..{.|
|00000230| 0a 09 76 61 72 20 69 6e | 74 20 4d 61 73 68 61 64 |..var in|t Mashad|
|00000240| 61 72 48 65 61 6c 74 68 | 3b 09 09 09 2f 2f 20 43 |arHealth|;...// C|
|00000250| 75 72 72 65 6e 74 20 68 | 65 61 6c 74 68 20 6f 66 |urrent h|ealth of|
|00000260| 20 73 61 69 64 20 6d 61 | 73 68 61 64 61 72 2e 0d | said ma|shadar..|
|00000270| 0a 09 76 61 72 20 62 79 | 74 65 20 41 63 74 69 76 |..var by|te Activ|
|00000280| 65 3b 09 09 09 09 2f 2f | 20 41 63 74 69 76 65 20 |e;....//| Active |
|00000290| 73 74 61 74 65 20 6f 66 | 20 74 68 69 73 20 6d 61 |state of| this ma|
|000002a0| 73 68 61 64 61 72 20 22 | 73 6c 6f 74 22 2e 20 31 |shadar "|slot". 1|
|000002b0| 20 3d 20 41 63 74 69 76 | 65 2c 20 30 20 3d 20 55 | = Activ|e, 0 = U|
|000002c0| 6e 61 63 74 69 76 65 2e | 0d 0a 7d 3b 0d 0a 76 61 |nactive.|..};..va|
|000002d0| 72 20 4d 61 73 68 61 64 | 61 72 49 6e 66 6f 20 4d |r Mashad|arInfo M|
|000002e0| 61 73 68 61 64 61 72 53 | 6c 6f 74 5b 32 35 36 5d |ashadarS|lot[256]|
|000002f0| 3b 09 2f 2f 20 4d 61 73 | 68 61 64 61 72 20 22 73 |;.// Mas|hadar "s|
|00000300| 6c 6f 74 73 22 2e 0d 0a | 0d 0a 63 6f 6e 73 74 20 |lots"...|..const |
|00000310| 47 55 41 52 44 5f 50 4f | 49 4e 54 5f 41 4c 4c 4f |GUARD_PO|INT_ALLO|
|00000320| 57 41 4e 43 45 20 3d 20 | 31 2e 30 3b 09 2f 2f 20 |WANCE = |1.0;.// |
|00000330| 48 6f 77 20 63 6c 6f 73 | 65 20 69 73 20 22 63 6c |How clos|e is "cl|
|00000340| 6f 73 65 20 65 6e 6f 75 | 67 68 22 20 77 68 65 6e |ose enou|gh" when|
|00000350| 20 63 6f 6d 70 61 72 69 | 6e 67 20 67 75 61 72 64 | compari|ng guard|
|00000360| 20 70 6f 69 6e 74 20 6c | 6f 63 61 74 69 6f 6e 73 | point l|ocations|
|00000370| 3f 0d 0a 0d 0a 73 74 72 | 75 63 74 20 4d 61 73 68 |?....str|uct Mash|
|00000380| 61 64 61 72 47 75 61 72 | 64 49 6e 66 6f 0d 0a 7b |adarGuar|dInfo..{|
|00000390| 0d 0a 09 76 61 72 28 29 | 20 41 63 74 6f 72 20 47 |...var()| Actor G|
|000003a0| 75 61 72 64 41 63 74 6f | 72 3b 09 09 09 2f 2f 20 |uardActo|r;...// |
|000003b0| 41 63 74 6f 72 73 20 77 | 65 20 6e 65 65 64 20 74 |Actors w|e need t|
|000003c0| 6f 20 67 75 61 72 64 20 | 28 74 61 6b 65 73 20 70 |o guard |(takes p|
|000003d0| 72 65 63 69 64 65 6e 63 | 65 20 6f 76 65 72 20 47 |recidenc|e over G|
|000003e0| 75 61 72 64 50 6f 69 6e | 74 29 2e 0d 0a 09 76 61 |uardPoin|t)....va|
|000003f0| 72 28 29 20 76 65 63 74 | 6f 72 20 47 75 61 72 64 |r() vect|or Guard|
|00000400| 50 6f 69 6e 74 3b 09 09 | 2f 2f 20 50 6f 69 6e 74 |Point;..|// Point|
|00000410| 73 20 77 65 20 6e 65 65 | 64 20 74 6f 20 67 75 61 |s we nee|d to gua|
|00000420| 72 64 2e 0d 0a 09 76 61 | 72 28 29 20 62 79 74 65 |rd....va|r() byte|
|00000430| 20 56 61 6c 69 64 3b 09 | 09 09 09 2f 2f 20 31 20 | Valid;.|...// 1 |
|00000440| 3d 20 44 61 74 61 20 69 | 73 20 76 61 6c 69 64 2c |= Data i|s valid,|
|00000450| 20 30 20 3d 20 44 61 74 | 61 20 69 73 20 6e 6f 74 | 0 = Dat|a is not|
|00000460| 20 76 61 6c 69 64 2e 0d | 0a 09 76 61 72 20 20 20 | valid..|..var |
|00000470| 62 79 74 65 20 43 6c 61 | 69 6d 65 64 3b 09 09 09 |byte Cla|imed;...|
|00000480| 09 2f 2f 20 31 20 3d 20 | 41 20 74 65 6e 64 72 69 |.// 1 = |A tendri|
|00000490| 6c 20 69 73 20 61 63 74 | 69 76 65 6c 79 20 67 75 |l is act|ively gu|
|000004a0| 61 72 64 69 6e 67 20 74 | 68 69 73 20 70 6f 69 6e |arding t|his poin|
|000004b0| 74 20 63 75 72 72 65 6e | 74 6c 79 2c 20 30 20 3d |t curren|tly, 0 =|
|000004c0| 20 46 72 65 65 20 66 6f | 72 20 74 68 65 20 63 6c | Free fo|r the cl|
|000004d0| 61 69 6d 69 6e 67 2e 0d | 0a 7d 3b 0d 0a 76 61 72 |aiming..|.};..var|
|000004e0| 28 29 20 4d 61 73 68 61 | 64 61 72 47 75 61 72 64 |() Masha|darGuard|
|000004f0| 49 6e 66 6f 20 47 75 61 | 72 64 44 61 74 61 5b 32 |Info Gua|rdData[2|
|00000500| 35 36 5d 3b 0d 0a 0d 0a | 76 61 72 28 29 20 66 6c |56];....|var() fl|
|00000510| 6f 61 74 20 47 75 61 72 | 64 52 61 64 69 75 73 3b |oat Guar|dRadius;|
|00000520| 09 09 09 2f 2f 20 48 6f | 77 20 63 6c 6f 73 65 20 |...// Ho|w close |
|00000530| 73 6f 6d 65 74 68 69 6e | 67 20 68 61 73 20 74 6f |somethin|g has to|
|00000540| 20 67 65 74 20 74 6f 20 | 6f 6e 65 20 6f 66 20 6f | get to |one of o|
|00000550| 75 72 20 67 75 61 72 64 | 20 70 6f 69 6e 74 73 20 |ur guard| points |
|00000560| 6f 72 20 0d 0a 09 09 09 | 09 09 09 09 09 09 2f 2f |or .....|......//|
|00000570| 20 61 63 74 6f 72 73 20 | 62 65 66 6f 72 65 20 77 | actors |before w|
|00000580| 65 20 77 69 6c 6c 20 61 | 74 74 61 63 6b 20 69 74 |e will a|ttack it|
|00000590| 2e 0d 0a 0d 0a 76 61 72 | 28 29 20 69 6e 74 20 53 |.....var|() int S|
|000005a0| 65 61 6c 47 75 61 72 64 | 43 6f 75 6e 74 3b 09 09 |ealGuard|Count;..|
|000005b0| 09 2f 2f 20 4e 75 6d 62 | 65 72 20 6f 66 20 74 65 |.// Numb|er of te|
|000005c0| 6e 64 72 69 6c 73 20 61 | 6c 6c 6f 77 65 64 20 74 |ndrils a|llowed t|
|000005d0| 6f 20 67 75 61 72 64 20 | 73 65 61 6c 73 20 61 74 |o guard |seals at|
|000005e0| 20 61 6e 79 20 67 69 76 | 65 6e 20 74 69 6d 65 2e | any giv|en time.|
|000005f0| 0d 0a 0d 0a 76 61 72 28 | 29 20 66 6c 6f 61 74 20 |....var(|) float |
|00000600| 53 65 61 6c 47 75 61 72 | 64 52 61 64 69 75 73 3b |SealGuar|dRadius;|
|00000610| 09 09 2f 2f 20 53 61 6d | 65 20 61 73 20 47 75 61 |..// Sam|e as Gua|
|00000620| 72 64 52 61 64 69 75 73 | 20 62 75 74 20 66 6f 72 |rdRadius| but for|
|00000630| 20 73 65 61 6c 73 20 73 | 70 65 63 69 66 69 63 61 | seals s|pecifica|
|00000640| 6c 6c 79 2e 0d 0a 0d 0a | 2f 2f 20 4d 61 78 69 6d |lly.....|// Maxim|
|00000650| 75 6d 20 6e 75 6d 62 65 | 72 20 6f 66 20 4d 61 73 |um numbe|r of Mas|
|00000660| 68 61 64 61 72 20 61 63 | 74 69 76 65 20 61 74 20 |hadar ac|tive at |
|00000670| 61 6e 79 20 67 69 76 65 | 6e 20 74 69 6d 65 2e 0d |any give|n time..|
|00000680| 0a 76 61 72 28 29 20 69 | 6e 74 20 4d 61 78 41 63 |.var() i|nt MaxAc|
|00000690| 74 69 76 65 4d 61 73 68 | 61 64 61 72 3b 0d 0a 0d |tiveMash|adar;...|
|000006a0| 0a 2f 2f 20 54 68 65 20 | 74 65 61 6d 20 49 27 6d |.// The |team I'm|
|000006b0| 20 6d 61 6e 61 67 69 6e | 67 20 66 6f 72 2e 0d 0a | managin|g for...|
|000006c0| 2f 2f 20 54 68 65 72 65 | 20 73 68 6f 75 6c 64 20 |// There| should |
|000006d0| 6f 6e 6c 79 20 65 76 65 | 72 20 62 65 20 6f 6e 65 |only eve|r be one|
|000006e0| 20 4d 61 73 68 61 64 61 | 72 4d 61 6e 61 67 65 72 | Mashada|rManager|
|000006f0| 20 70 65 72 20 74 65 61 | 6d 2e 0d 0a 76 61 72 28 | per tea|m...var(|
|00000700| 29 20 62 79 74 65 20 54 | 65 61 6d 3b 0d 0a 0d 0a |) byte T|eam;....|
|00000710| 2f 2f 20 44 61 6d 61 67 | 65 20 72 65 71 75 69 72 |// Damag|e requir|
|00000720| 65 64 20 74 6f 20 73 74 | 69 6d 75 6c 61 74 65 20 |ed to st|imulate |
|00000730| 61 20 64 69 65 20 68 61 | 72 64 20 61 75 64 69 6f |a die ha|rd audio|
|00000740| 20 72 65 73 70 6f 6e 73 | 65 20 6f 6e 20 64 65 61 | respons|e on dea|
|00000750| 74 68 20 6f 66 20 61 20 | 74 65 6e 64 72 69 6c 2e |th of a |tendril.|
|00000760| 0d 0a 76 61 72 28 29 20 | 69 6e 74 20 44 69 65 48 |..var() |int DieH|
|00000770| 61 72 64 54 68 72 65 73 | 68 6f 6c 64 3b 0d 0a 0d |ardThres|hold;...|
|00000780| 0a 2f 2f 20 44 61 6d 61 | 67 65 20 72 65 71 75 69 |.// Dama|ge requi|
|00000790| 72 65 64 20 74 6f 20 73 | 74 69 6d 75 6c 61 74 65 |red to s|timulate|
|000007a0| 20 61 20 68 61 72 64 20 | 68 69 74 20 61 75 64 69 | a hard |hit audi|
|000007b0| 6f 20 72 65 73 70 6f 6e | 73 65 2e 0d 0a 76 61 72 |o respon|se...var|
|000007c0| 28 29 20 69 6e 74 20 48 | 69 74 48 61 72 64 54 68 |() int H|itHardTh|
|000007d0| 72 65 73 68 6f 6c 64 3b | 0d 0a 0d 0a 2f 2f 20 41 |reshold;|....// A|
|000007e0| 72 65 6e 61 20 69 6e 74 | 65 72 66 61 63 65 20 66 |rena int|erface f|
|000007f0| 6f 72 20 61 73 73 69 67 | 6e 69 6e 67 20 64 65 61 |or assig|ning dea|
|00000800| 74 68 20 70 6f 69 6e 74 | 73 2c 20 65 74 63 2e 0d |th point|s, etc..|
|00000810| 0a 76 61 72 20 50 61 77 | 6e 20 41 72 65 6e 61 4d |.var Paw|n ArenaM|
|00000820| 61 73 68 61 64 61 72 50 | 61 77 6e 49 6e 74 65 72 |ashadarP|awnInter|
|00000830| 66 61 63 65 3b 0d 0a 0d | 0a 72 65 70 6c 69 63 61 |face;...|.replica|
|00000840| 74 69 6f 6e 0d 0a 7b 0d | 0a 09 72 65 6c 69 61 62 |tion..{.|..reliab|
|00000850| 6c 65 20 69 66 28 20 52 | 6f 6c 65 3d 3d 52 4f 4c |le if( R|ole==ROL|
|00000860| 45 5f 41 75 74 68 6f 72 | 69 74 79 20 29 0d 0a 09 |E_Author|ity )...|
|00000870| 09 4d 61 78 41 63 74 69 | 76 65 4d 61 73 68 61 64 |.MaxActi|veMashad|
|00000880| 61 72 2c 0d 0a 09 09 54 | 65 61 6d 2c 0d 0a 09 09 |ar,....T|eam,....|
|00000890| 44 69 65 48 61 72 64 54 | 68 72 65 73 68 6f 6c 64 |DieHardT|hreshold|
|000008a0| 2c 0d 0a 09 09 48 69 74 | 48 61 72 64 54 68 72 65 |,....Hit|HardThre|
|000008b0| 73 68 6f 6c 64 3b 0d 0a | 7d 0d 0a 0d 0a 2f 2f 2d |shold;..|}....//-|
|000008c0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000008d0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000008e0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000008f0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00000900| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 0d 0a 73 |--------|-----..s|
|00000910| 69 6d 75 6c 61 74 65 64 | 20 66 75 6e 63 74 69 6f |imulated| functio|
|00000920| 6e 20 50 72 65 42 65 67 | 69 6e 50 6c 61 79 28 29 |n PreBeg|inPlay()|
|00000930| 0d 0a 7b 0d 0a 09 6c 6f | 63 61 6c 20 69 6e 74 20 |..{...lo|cal int |
|00000940| 69 2c 20 4d 61 78 3b 0d | 0a 0d 0a 09 4d 61 78 20 |i, Max;.|....Max |
|00000950| 3d 20 4d 61 78 41 63 74 | 69 76 65 4d 61 73 68 61 |= MaxAct|iveMasha|
|00000960| 64 61 72 3b 0d 0a 09 4d | 61 78 41 63 74 69 76 65 |dar;...M|axActive|
|00000970| 4d 61 73 68 61 64 61 72 | 20 3d 20 30 3b 0d 0a 0d |Mashadar| = 0;...|
|00000980| 0a 09 66 6f 72 28 20 69 | 20 3d 20 30 3b 20 69 20 |..for( i| = 0; i |
|00000990| 3c 20 4d 61 78 3b 20 69 | 2b 2b 20 29 0d 0a 09 7b |< Max; i|++ )...{|
|000009a0| 0d 0a 09 09 41 64 64 4d | 61 73 68 61 64 61 72 28 |....AddM|ashadar(|
|000009b0| 29 3b 0d 0a 09 7d 0d 0a | 0d 0a 09 53 75 70 65 72 |);...}..|...Super|
|000009c0| 2e 50 72 65 42 65 67 69 | 6e 50 6c 61 79 28 29 3b |.PreBegi|nPlay();|
|000009d0| 0d 0a 7d 0d 0a 0d 0a 2f | 2f 2d 2d 2d 2d 2d 2d 2d |..}..../|/-------|
|000009e0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000009f0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00000a00| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00000a10| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00000a20| 2d 2d 2d 2d 2d 2d 2d 0d | 0a 66 75 6e 63 74 69 6f |-------.|.functio|
|00000a30| 6e 20 62 6f 6f 6c 20 41 | 64 64 4d 61 73 68 61 64 |n bool A|ddMashad|
|00000a40| 61 72 28 29 0d 0a 7b 0d | 0a 09 6c 6f 63 61 6c 20 |ar()..{.|..local |
|00000a50| 69 6e 74 20 69 3b 0d 0a | 0d 0a 09 69 66 28 20 4d |int i;..|...if( M|
|00000a60| 61 78 41 63 74 69 76 65 | 4d 61 73 68 61 64 61 72 |axActive|Mashadar|
|00000a70| 20 3c 20 41 72 72 61 79 | 43 6f 75 6e 74 28 4d 61 | < Array|Count(Ma|
|00000a80| 73 68 61 64 61 72 53 6c | 6f 74 29 20 29 0d 0a 09 |shadarSl|ot) )...|
|00000a90| 7b 0d 0a 09 09 4d 61 73 | 68 61 64 61 72 53 6c 6f |{....Mas|hadarSlo|
|00000aa0| 74 5b 4d 61 78 41 63 74 | 69 76 65 4d 61 73 68 61 |t[MaxAct|iveMasha|
|00000ab0| 64 61 72 2b 2b 5d 2e 4d | 61 73 68 61 64 61 72 48 |dar++].M|ashadarH|
|00000ac0| 65 61 6c 74 68 20 3d 20 | 69 6e 74 28 52 61 6e 64 |ealth = |int(Rand|
|00000ad0| 52 61 6e 67 65 28 20 4d | 61 73 68 61 64 61 72 4d |Range( M|ashadarM|
|00000ae0| 69 6e 48 65 61 6c 74 68 | 2c 20 4d 61 73 68 61 64 |inHealth|, Mashad|
|00000af0| 61 72 4d 61 78 48 65 61 | 6c 74 68 20 29 29 3b 0d |arMaxHea|lth ));.|
|00000b00| 0a 09 09 72 65 74 75 72 | 6e 20 74 72 75 65 3b 0d |...retur|n true;.|
|00000b10| 0a 09 7d 0d 0a 09 65 6c | 73 65 0d 0a 09 7b 0d 0a |..}...el|se...{..|
|00000b20| 09 09 2f 2f 4f 42 45 20 | 43 6c 65 61 6e 55 70 53 |..//OBE |CleanUpS|
|00000b30| 6c 6f 74 73 28 29 3b 0d | 0a 0d 0a 09 09 2f 2f 20 |lots();.|.....// |
|00000b40| 46 69 6e 64 20 61 20 64 | 65 61 64 20 6d 61 73 68 |Find a d|ead mash|
|00000b50| 61 64 61 72 20 73 6c 6f | 74 20 61 6e 64 20 75 73 |adar slo|t and us|
|00000b60| 65 20 69 74 2e 0d 0a 09 | 09 66 6f 72 28 20 69 20 |e it....|.for( i |
|00000b70| 3d 20 30 3b 20 69 20 3c | 20 4d 61 78 41 63 74 69 |= 0; i <| MaxActi|
|00000b80| 76 65 4d 61 73 68 61 64 | 61 72 3b 20 69 2b 2b 20 |veMashad|ar; i++ |
|00000b90| 29 0d 0a 09 09 7b 0d 0a | 09 09 09 69 66 28 20 4d |)....{..|...if( M|
|00000ba0| 61 73 68 61 64 61 72 53 | 6c 6f 74 5b 69 5d 2e 41 |ashadarS|lot[i].A|
|00000bb0| 63 74 69 76 65 20 3d 3d | 20 30 20 26 26 20 4d 61 |ctive ==| 0 && Ma|
|00000bc0| 73 68 61 64 61 72 53 6c | 6f 74 5b 69 5d 2e 4d 61 |shadarSl|ot[i].Ma|
|00000bd0| 73 68 61 64 61 72 48 65 | 61 6c 74 68 20 3c 3d 20 |shadarHe|alth <= |
|00000be0| 30 20 29 0d 0a 09 09 09 | 7b 0d 0a 09 09 09 09 4d |0 ).....|{......M|
|00000bf0| 61 73 68 61 64 61 72 53 | 6c 6f 74 5b 69 5d 2e 4d |ashadarS|lot[i].M|
|00000c00| 61 73 68 61 64 61 72 48 | 65 61 6c 74 68 20 3d 20 |ashadarH|ealth = |
|00000c10| 69 6e 74 28 52 61 6e 64 | 52 61 6e 67 65 28 20 4d |int(Rand|Range( M|
|00000c20| 61 73 68 61 64 61 72 4d | 69 6e 48 65 61 6c 74 68 |ashadarM|inHealth|
|00000c30| 2c 20 4d 61 73 68 61 64 | 61 72 4d 61 78 48 65 61 |, Mashad|arMaxHea|
|00000c40| 6c 74 68 20 29 29 3b 0d | 0a 09 09 09 09 72 65 74 |lth ));.|.....ret|
|00000c50| 75 72 6e 20 74 72 75 65 | 3b 09 2f 2f 20 4e 6f 20 |urn true|;.// No |
|00000c60| 6e 65 65 64 20 74 6f 20 | 67 6f 20 6f 6e 2e 0d 0a |need to |go on...|
|00000c70| 09 09 09 7d 0d 0a 09 09 | 7d 0d 0a 09 09 77 61 72 |...}....|}....war|
|00000c80| 6e 28 20 22 43 61 6e 6e | 6f 74 20 61 64 64 20 4d |n( "Cann|ot add M|
|00000c90| 61 73 68 61 64 61 72 2e | 2e 2e 20 6d 61 78 69 6d |ashadar.|.. maxim|
|00000ca0| 75 6d 20 63 61 70 61 63 | 69 74 79 20 72 65 61 63 |um capac|ity reac|
|00000cb0| 68 65 64 2e 22 20 29 3b | 0d 0a 09 09 72 65 74 75 |hed." );|....retu|
|00000cc0| 72 6e 20 66 61 6c 73 65 | 3b 0d 0a 09 7d 0d 0a 7d |rn false|;...}..}|
|00000cd0| 0d 0a 0d 0a 2f 2f 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |....//--|--------|
|00000ce0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00000cf0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00000d00| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00000d10| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00000d20| 2d 2d 2d 2d 0d 0a 2f 2f | 20 49 66 20 6e 6f 20 4d |----..//| If no M|
|00000d30| 61 73 68 61 64 61 72 20 | 69 73 20 67 69 76 65 6e |ashadar |is given|
|00000d40| 2c 20 74 68 65 6e 20 72 | 65 6d 6f 76 65 20 61 6e |, then r|emove an|
|00000d50| 79 20 6e 6f 6e 2d 61 63 | 74 69 76 65 20 73 6c 6f |y non-ac|tive slo|
|00000d60| 74 2e 0d 0a 2f 2f 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |t...//--|--------|
|00000d70| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00000d80| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00000d90| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00000da0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00000db0| 2d 2d 2d 2d 0d 0a 66 75 | 6e 63 74 69 6f 6e 20 52 |----..fu|nction R|
|00000dc0| 65 6d 6f 76 65 4d 61 73 | 68 61 64 61 72 28 20 6f |emoveMas|hadar( o|
|00000dd0| 70 74 69 6f 6e 61 6c 20 | 4d 61 73 68 61 64 61 72 |ptional |Mashadar|
|00000de0| 47 75 69 64 65 20 4d 61 | 73 68 20 29 0d 0a 7b 0d |Guide Ma|sh )..{.|
|00000df0| 0a 09 6c 6f 63 61 6c 20 | 69 6e 74 20 69 3b 0d 0a |..local |int i;..|
|00000e00| 0d 0a 09 69 66 28 20 4d | 61 73 68 20 21 3d 20 4e |...if( M|ash != N|
|00000e10| 6f 6e 65 20 26 26 20 4d | 61 73 68 2e 62 41 63 74 |one && M|ash.bAct|
|00000e20| 69 76 65 20 29 0d 0a 09 | 7b 0d 0a 09 09 4d 61 73 |ive )...|{....Mas|
|00000e30| 68 61 64 61 72 53 6c 6f | 74 5b 4d 61 73 68 2e 49 |hadarSlo|t[Mash.I|
|00000e40| 6e 64 65 78 5d 2e 4d 61 | 73 68 61 64 61 72 48 65 |ndex].Ma|shadarHe|
|00000e50| 61 6c 74 68 20 3d 20 30 | 3b 0d 0a 09 09 4d 61 73 |alth = 0|;....Mas|
|00000e60| 68 61 64 61 72 53 6c 6f | 74 5b 4d 61 73 68 2e 49 |hadarSlo|t[Mash.I|
|00000e70| 6e 64 65 78 5d 2e 41 63 | 74 69 76 65 20 3d 20 30 |ndex].Ac|tive = 0|
|00000e80| 3b 0d 0a 09 09 2f 2f 20 | 4e 4f 54 45 5b 61 6c 65 |;....// |NOTE[ale|
|00000e90| 69 62 79 5d 3a 20 53 68 | 6f 75 6c 64 20 77 65 20 |iby]: Sh|ould we |
|00000ea0| 62 65 20 64 65 61 63 74 | 69 76 61 74 69 6e 67 20 |be deact|ivating |
|00000eb0| 74 68 65 20 4d 61 73 68 | 61 64 61 72 47 75 69 64 |the Mash|adarGuid|
|00000ec0| 65 20 68 65 72 65 20 74 | 6f 6f 2c 20 6f 72 20 6c |e here t|oo, or l|
|00000ed0| 65 61 76 65 20 74 68 65 | 0d 0a 09 09 2f 2f 20 72 |eave the|....// r|
|00000ee0| 65 73 70 6f 6e 73 69 62 | 69 6c 69 74 79 20 74 6f |esponsib|ility to|
|00000ef0| 20 74 68 65 20 63 61 6c | 6c 65 72 2e 0d 0a 09 7d | the cal|ler....}|
|00000f00| 0d 0a 09 65 6c 73 65 0d | 0a 09 7b 0d 0a 09 09 66 |...else.|..{....f|
|00000f10| 6f 72 28 20 69 20 3d 20 | 30 3b 20 69 20 3c 20 4d |or( i = |0; i < M|
|00000f20| 61 78 41 63 74 69 76 65 | 4d 61 73 68 61 64 61 72 |axActive|Mashadar|
|00000f30| 3b 20 69 2b 2b 20 29 0d | 0a 09 09 7b 0d 0a 09 09 |; i++ ).|...{....|
|00000f40| 09 69 66 28 20 4d 61 73 | 68 61 64 61 72 53 6c 6f |.if( Mas|hadarSlo|
|00000f50| 74 5b 69 5d 2e 41 63 74 | 69 76 65 20 3d 3d 20 30 |t[i].Act|ive == 0|
|00000f60| 20 26 26 20 4d 61 73 68 | 61 64 61 72 53 6c 6f 74 | && Mash|adarSlot|
|00000f70| 5b 69 5d 2e 4d 61 73 68 | 61 64 61 72 48 65 61 6c |[i].Mash|adarHeal|
|00000f80| 74 68 20 3e 20 30 20 29 | 0d 0a 09 09 09 7b 0d 0a |th > 0 )|.....{..|
|00000f90| 09 09 09 09 4d 61 73 68 | 61 64 61 72 53 6c 6f 74 |....Mash|adarSlot|
|00000fa0| 5b 69 5d 2e 4d 61 73 68 | 61 64 61 72 48 65 61 6c |[i].Mash|adarHeal|
|00000fb0| 74 68 20 3d 20 30 3b 0d | 0a 09 09 09 09 62 72 65 |th = 0;.|.....bre|
|00000fc0| 61 6b 3b 09 2f 2f 20 4e | 6f 20 6e 65 65 64 20 74 |ak;.// N|o need t|
|00000fd0| 6f 20 67 6f 20 6f 6e 2e | 0d 0a 09 09 09 7d 0d 0a |o go on.|.....}..|
|00000fe0| 09 09 7d 0d 0a 09 7d 0d | 0a 7d 0d 0a 0d 0a 2f 2f |..}...}.|.}....//|
|00000ff0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00001000| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00001010| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00001020| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00001030| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 0d 0a |--------|------..|
|00001040| 73 69 6d 75 6c 61 74 65 | 64 20 66 75 6e 63 74 69 |simulate|d functi|
|00001050| 6f 6e 20 43 6c 65 61 6e | 55 70 53 6c 6f 74 73 28 |on Clean|UpSlots(|
|00001060| 29 0d 0a 7b 0d 0a 09 2f | 2f 20 4e 4f 54 45 5b 61 |)..{.../|/ NOTE[a|
|00001070| 6c 65 69 62 79 5d 3a 20 | 52 65 6d 6f 76 65 20 73 |leiby]: |Remove s|
|00001080| 6c 6f 74 73 20 77 69 74 | 68 20 48 65 61 6c 74 68 |lots wit|h Health|
|00001090| 20 3c 3d 20 30 20 61 6e | 64 20 63 6f 6c 6c 61 70 | <= 0 an|d collap|
|000010a0| 73 65 20 72 65 6d 61 69 | 6e 69 6e 67 20 73 6c 6f |se remai|ning slo|
|000010b0| 74 73 2e 0d 0a 09 77 61 | 72 6e 28 20 22 41 61 72 |ts....wa|rn( "Aar|
|000010c0| 6f 6e 20 66 6f 72 67 6f | 74 20 74 6f 20 69 6d 70 |on forgo|t to imp|
|000010d0| 6c 65 6d 65 6e 74 20 74 | 68 69 73 20 66 75 6e 63 |lement t|his func|
|000010e0| 74 69 6f 6e 2e 22 20 29 | 3b 0d 0a 09 61 73 73 65 |tion." )|;...asse|
|000010f0| 72 74 28 20 74 72 75 65 | 20 29 3b 0d 0a 2f 2a 0d |rt( true| );../*.|
|00001100| 0a 09 6c 6f 63 61 6c 20 | 69 6e 74 20 69 3b 0d 0a |..local |int i;..|
|00001110| 0d 0a 09 4d 61 78 41 63 | 74 69 76 65 4d 61 73 68 |...MaxAc|tiveMash|
|00001120| 61 64 61 72 20 3d 20 30 | 3b 0d 0a 09 66 6f 72 28 |adar = 0|;...for(|
|00001130| 20 69 20 3d 20 30 3b 20 | 69 20 3c 20 41 72 72 61 | i = 0; |i < Arra|
|00001140| 79 43 6f 75 6e 74 28 4d | 61 73 68 61 64 61 72 53 |yCount(M|ashadarS|
|00001150| 6c 6f 74 29 3b 20 69 2b | 2b 20 29 0d 0a 09 7b 0d |lot); i+|+ )...{.|
|00001160| 0a 09 09 69 66 28 20 4d | 61 73 68 61 64 61 72 53 |...if( M|ashadarS|
|00001170| 6c 6f 74 5b 69 5d 2e 4d | 61 73 68 61 64 61 72 48 |lot[i].M|ashadarH|
|00001180| 65 61 6c 74 68 20 3c 3d | 20 30 20 29 0d 0a 09 09 |ealth <=| 0 )....|
|00001190| 7b 0d 0a 09 09 09 4d 61 | 73 68 61 64 61 72 53 6c |{.....Ma|shadarSl|
|000011a0| 6f 74 5b 4d 61 78 41 63 | 74 69 76 65 4d 61 73 68 |ot[MaxAc|tiveMash|
|000011b0| 61 64 61 72 5d 2e 4d 61 | 73 68 61 64 61 72 48 65 |adar].Ma|shadarHe|
|000011c0| 61 6c 74 68 20 3d 20 4d | 61 73 68 61 64 61 72 53 |alth = M|ashadarS|
|000011d0| 6c 6f 74 5b 69 5d 2e 4d | 61 73 68 61 64 61 72 48 |lot[i].M|ashadarH|
|000011e0| 65 61 6c 74 68 3b 0d 0a | 09 09 09 4d 61 73 68 61 |ealth;..|...Masha|
|000011f0| 64 61 72 53 6c 6f 74 5b | 4d 61 78 41 63 74 69 76 |darSlot[|MaxActiv|
|00001200| 65 4d 61 73 68 61 64 61 | 72 5d 2e 41 63 74 69 76 |eMashada|r].Activ|
|00001210| 65 20 3d 20 4d 61 73 68 | 61 64 61 72 53 6c 6f 74 |e = Mash|adarSlot|
|00001220| 5b 69 5d 2e 41 63 74 69 | 76 65 3b 0d 0a 09 09 09 |[i].Acti|ve;.....|
|00001230| 7b 55 70 64 61 74 65 20 | 61 73 73 6f 63 69 61 74 |{Update |associat|
|00001240| 65 64 20 4d 61 73 68 61 | 64 61 72 27 73 20 49 6e |ed Masha|dar's In|
|00001250| 64 65 78 20 74 6f 20 72 | 65 66 6c 65 63 74 20 73 |dex to r|eflect s|
|00001260| 6c 6f 74 20 73 68 75 66 | 66 6c 69 6e 67 2e 7d 0d |lot shuf|fling.}.|
|00001270| 0a 09 09 09 4d 61 78 41 | 63 74 69 76 65 4d 61 73 |....MaxA|ctiveMas|
|00001280| 68 61 64 61 72 2b 2b 3b | 0d 0a 09 09 7d 0d 0a 09 |hadar++;|....}...|
|00001290| 7d 0d 0a 2a 2f 0d 0a 7d | 0d 0a 0d 0a 2f 2f 2d 2d |}..*/..}|....//--|
|000012a0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000012b0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000012c0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000012d0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000012e0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 0d 0a 66 75 |--------|----..fu|
|000012f0| 6e 63 74 69 6f 6e 20 48 | 75 72 74 4d 61 73 68 61 |nction H|urtMasha|
|00001300| 64 61 72 28 20 4d 61 73 | 68 61 64 61 72 47 75 69 |dar( Mas|hadarGui|
|00001310| 64 65 20 4d 61 73 68 2c | 20 69 6e 74 20 44 61 6d |de Mash,| int Dam|
|00001320| 61 67 65 2c 20 50 61 77 | 6e 20 44 61 6d 61 67 65 |age, Paw|n Damage|
|00001330| 49 6e 73 74 69 67 61 74 | 6f 72 2c 20 6e 61 6d 65 |Instigat|or, name|
|00001340| 20 44 61 6d 61 67 65 54 | 79 70 65 20 29 0d 0a 7b | DamageT|ype )..{|
|00001350| 0d 0a 09 6c 6f 63 61 6c | 20 50 61 77 6e 20 49 74 |...local| Pawn It|
|00001360| 65 72 50 3b 0d 0a 0d 0a | 09 69 66 28 20 4d 61 73 |erP;....|.if( Mas|
|00001370| 68 61 64 61 72 53 6c 6f | 74 5b 4d 61 73 68 2e 49 |hadarSlo|t[Mash.I|
|00001380| 6e 64 65 78 5d 2e 4d 61 | 73 68 61 64 61 72 48 65 |ndex].Ma|shadarHe|
|00001390| 61 6c 74 68 20 3e 20 30 | 20 29 0d 0a 09 7b 0d 0a |alth > 0| )...{..|
|000013a0| 09 09 4d 61 73 68 61 64 | 61 72 53 6c 6f 74 5b 4d |..Mashad|arSlot[M|
|000013b0| 61 73 68 2e 49 6e 64 65 | 78 5d 2e 4d 61 73 68 61 |ash.Inde|x].Masha|
|000013c0| 64 61 72 48 65 61 6c 74 | 68 20 2d 3d 20 44 61 6d |darHealt|h -= Dam|
|000013d0| 61 67 65 3b 0d 0a 0d 0a | 09 09 69 66 28 20 4d 61 |age;....|..if( Ma|
|000013e0| 73 68 61 64 61 72 53 6c | 6f 74 5b 4d 61 73 68 2e |shadarSl|ot[Mash.|
|000013f0| 49 6e 64 65 78 5d 2e 4d | 61 73 68 61 64 61 72 48 |Index].M|ashadarH|
|00001400| 65 61 6c 74 68 20 3c 3d | 20 30 20 29 0d 0a 09 09 |ealth <=| 0 )....|
|00001410| 7b 0d 0a 09 09 09 4d 61 | 73 68 2e 62 46 75 6c 6c |{.....Ma|sh.bFull|
|00001420| 52 65 74 72 61 63 74 20 | 3d 20 74 72 75 65 3b 0d |Retract |= true;.|
|00001430| 0a 09 09 09 4d 61 73 68 | 2e 44 65 61 63 74 69 76 |....Mash|.Deactiv|
|00001440| 61 74 65 28 29 3b 0d 0a | 0d 0a 09 09 09 2f 2f 20 |ate();..|.....// |
|00001450| 50 6c 61 79 53 6f 75 6e | 64 20 6f 6e 20 64 65 61 |PlaySoun|d on dea|
|00001460| 74 68 2e 0d 0a 09 09 09 | 69 66 28 20 4d 61 73 68 |th......|if( Mash|
|00001470| 61 64 61 72 53 6c 6f 74 | 5b 4d 61 73 68 2e 49 6e |adarSlot|[Mash.In|
|00001480| 64 65 78 5d 2e 4d 61 73 | 68 61 64 61 72 48 65 61 |dex].Mas|hadarHea|
|00001490| 6c 74 68 20 3c 3d 20 44 | 69 65 48 61 72 64 54 68 |lth <= D|ieHardTh|
|000014a0| 72 65 73 68 6f 6c 64 20 | 29 0d 0a 09 09 09 7b 0d |reshold |).....{.|
|000014b0| 0a 09 09 09 09 4d 61 73 | 68 2e 50 6c 61 79 53 6c |.....Mas|h.PlaySl|
|000014c0| 6f 74 53 6f 75 6e 64 28 | 20 4d 61 73 68 2e 53 6f |otSound(| Mash.So|
|000014d0| 75 6e 64 54 61 62 6c 65 | 2e 44 69 65 48 61 72 64 |undTable|.DieHard|
|000014e0| 53 6f 75 6e 64 53 6c 6f | 74 20 29 3b 0d 0a 09 09 |SoundSlo|t );....|
|000014f0| 09 7d 0d 0a 09 09 09 65 | 6c 73 65 0d 0a 09 09 09 |.}.....e|lse.....|
|00001500| 7b 0d 0a 09 09 09 09 4d | 61 73 68 2e 50 6c 61 79 |{......M|ash.Play|
|00001510| 53 6c 6f 74 53 6f 75 6e | 64 28 20 4d 61 73 68 2e |SlotSoun|d( Mash.|
|00001520| 53 6f 75 6e 64 54 61 62 | 6c 65 2e 44 69 65 53 6f |SoundTab|le.DieSo|
|00001530| 66 74 53 6f 75 6e 64 53 | 6c 6f 74 20 29 3b 0d 0a |ftSoundS|lot );..|
|00001540| 09 09 09 7d 0d 0a 0d 0a | 09 09 09 2f 2f 20 53 65 |...}....|...// Se|
|00001550| 6e 64 20 41 72 65 6e 61 | 20 44 65 61 74 68 4d 65 |nd Arena| DeathMe|
|00001560| 73 73 61 67 65 73 20 61 | 6e 64 20 63 6c 65 61 6e |ssages a|nd clean|
|00001570| 20 75 70 20 46 6f 63 75 | 73 50 61 77 6e 2e 0d 0a | up Focu|sPawn...|
|00001580| 09 09 09 69 66 28 20 41 | 72 65 6e 61 4d 61 73 68 |...if( A|renaMash|
|00001590| 61 64 61 72 50 61 77 6e | 49 6e 74 65 72 66 61 63 |adarPawn|Interfac|
|000015a0| 65 20 21 3d 20 4e 6f 6e | 65 20 29 0d 0a 09 09 09 |e != Non|e ).....|
|000015b0| 7b 0d 0a 09 09 09 09 4c | 65 76 65 6c 2e 47 61 6d |{......L|evel.Gam|
|000015c0| 65 2e 4b 69 6c 6c 65 64 | 28 20 44 61 6d 61 67 65 |e.Killed|( Damage|
|000015d0| 49 6e 73 74 69 67 61 74 | 6f 72 2c 20 41 72 65 6e |Instigat|or, Aren|
|000015e0| 61 4d 61 73 68 61 64 61 | 72 50 61 77 6e 49 6e 74 |aMashada|rPawnInt|
|000015f0| 65 72 66 61 63 65 2c 20 | 44 61 6d 61 67 65 54 79 |erface, |DamageTy|
|00001600| 70 65 20 29 3b 0d 0a 0d | 0a 09 09 09 09 2f 2f 20 |pe );...|.....// |
|00001610| 43 6c 65 61 6e 20 75 70 | 2e 0d 0a 09 09 09 09 41 |Clean up|.......A|
|00001620| 72 65 6e 61 4d 61 73 68 | 61 64 61 72 50 61 77 6e |renaMash|adarPawn|
|00001630| 49 6e 74 65 72 66 61 63 | 65 2e 44 65 73 74 72 6f |Interfac|e.Destro|
|00001640| 79 28 29 3b 0d 0a 09 09 | 09 09 41 72 65 6e 61 4d |y();....|..ArenaM|
|00001650| 61 73 68 61 64 61 72 50 | 61 77 6e 49 6e 74 65 72 |ashadarP|awnInter|
|00001660| 66 61 63 65 20 3d 20 4e | 6f 6e 65 3b 0d 0a 09 09 |face = N|one;....|
|00001670| 09 09 4d 61 73 68 2e 44 | 65 73 74 72 6f 79 28 29 |..Mash.D|estroy()|
|00001680| 3b 0d 0a 09 09 09 09 53 | 65 6c 66 2e 44 65 73 74 |;......S|elf.Dest|
|00001690| 72 6f 79 28 29 3b 0d 0a | 09 09 09 7d 0d 0a 0d 0a |roy();..|...}....|
|000016a0| 09 09 09 2f 2f 20 53 65 | 6e 64 20 43 69 74 61 64 |...// Se|nd Citad|
|000016b0| 65 6c 20 44 65 61 74 68 | 4d 65 73 73 61 67 65 73 |el Death|Messages|
|000016c0| 20 61 6e 64 20 63 6c 65 | 61 6e 20 75 70 20 46 6f | and cle|an up Fo|
|000016d0| 63 75 73 50 61 77 6e 2e | 0d 0a 09 09 09 65 6c 73 |cusPawn.|.....els|
|000016e0| 65 0d 0a 09 09 09 7b 0d | 0a 09 09 09 09 66 6f 72 |e.....{.|.....for|
|000016f0| 28 20 49 74 65 72 50 20 | 3d 20 4c 65 76 65 6c 2e |( IterP |= Level.|
|00001700| 50 61 77 6e 4c 69 73 74 | 3b 20 49 74 65 72 50 20 |PawnList|; IterP |
|00001710| 21 3d 20 4e 6f 6e 65 3b | 20 49 74 65 72 50 20 3d |!= None;| IterP =|
|00001720| 20 49 74 65 72 50 2e 4e | 65 78 74 50 61 77 6e 20 | IterP.N|extPawn |
|00001730| 29 0d 0a 09 09 09 09 7b | 0d 0a 09 09 09 09 09 69 |)......{|.......i|
|00001740| 66 0d 0a 09 09 09 09 09 | 28 09 4d 61 73 68 61 64 |f.......|(.Mashad|
|00001750| 61 72 46 6f 63 75 73 50 | 61 77 6e 28 49 74 65 72 |arFocusP|awn(Iter|
|00001760| 50 29 20 21 3d 20 4e 6f | 6e 65 20 0d 0a 09 09 09 |P) != No|ne .....|
|00001770| 09 09 26 26 09 49 74 65 | 72 50 2e 54 61 67 20 21 |..&&.Ite|rP.Tag !|
|00001780| 3d 20 27 41 6e 67 72 65 | 61 6c 53 70 61 77 6e 65 |= 'Angre|alSpawne|
|00001790| 64 27 0d 0a 09 09 09 09 | 09 26 26 09 49 74 65 72 |d'......|.&&.Iter|
|000017a0| 50 2e 50 6c 61 79 65 72 | 52 65 70 6c 69 63 61 74 |P.Player|Replicat|
|000017b0| 69 6f 6e 49 6e 66 6f 2e | 54 65 61 6d 20 3d 3d 20 |ionInfo.|Team == |
|000017c0| 54 65 61 6d 0d 0a 09 09 | 09 09 09 29 0d 0a 09 09 |Team....|...)....|
|000017d0| 09 09 09 7b 0d 0a 09 09 | 09 09 09 09 4c 65 76 65 |...{....|....Leve|
|000017e0| 6c 2e 47 61 6d 65 2e 4b | 69 6c 6c 65 64 28 20 44 |l.Game.K|illed( D|
|000017f0| 61 6d 61 67 65 49 6e 73 | 74 69 67 61 74 6f 72 2c |amageIns|tigator,|
|00001800| 20 49 74 65 72 50 2c 20 | 44 61 6d 61 67 65 54 79 | IterP, |DamageTy|
|00001810| 70 65 20 29 3b 0d 0a 09 | 09 09 09 09 09 49 74 65 |pe );...|.....Ite|
|00001820| 72 50 2e 44 65 73 74 72 | 6f 79 28 29 3b 0d 0a 09 |rP.Destr|oy();...|
|00001830| 09 09 09 09 09 4d 61 73 | 68 2e 44 65 73 74 72 6f |.....Mas|h.Destro|
|00001840| 79 28 29 3b 0d 0a 09 09 | 09 09 09 09 62 72 65 61 |y();....|....brea|
|00001850| 6b 3b 0d 0a 09 09 09 09 | 09 7d 0d 0a 09 09 09 09 |k;......|.}......|
|00001860| 7d 0d 0a 09 09 09 7d 0d | 0a 09 09 7d 0d 0a 09 09 |}.....}.|...}....|
|00001870| 65 6c 73 65 0d 0a 09 09 | 7b 0d 0a 09 09 09 2f 2f |else....|{.....//|
|00001880| 20 50 6c 61 79 53 6f 75 | 6e 64 20 6f 6e 20 6e 6f | PlaySou|nd on no|
|00001890| 72 6d 61 6c 20 68 69 74 | 2e 0d 0a 09 09 09 69 66 |rmal hit|......if|
|000018a0| 28 20 44 61 6d 61 67 65 | 20 3e 3d 20 48 69 74 48 |( Damage| >= HitH|
|000018b0| 61 72 64 54 68 72 65 73 | 68 6f 6c 64 20 29 0d 0a |ardThres|hold )..|
|000018c0| 09 09 09 7b 0d 0a 09 09 | 09 09 4d 61 73 68 2e 50 |...{....|..Mash.P|
|000018d0| 6c 61 79 53 6c 6f 74 53 | 6f 75 6e 64 28 20 4d 61 |laySlotS|ound( Ma|
|000018e0| 73 68 2e 53 6f 75 6e 64 | 54 61 62 6c 65 2e 48 69 |sh.Sound|Table.Hi|
|000018f0| 74 48 61 72 64 53 6f 75 | 6e 64 53 6c 6f 74 20 29 |tHardSou|ndSlot )|
|00001900| 3b 0d 0a 09 09 09 7d 0d | 0a 09 09 09 65 6c 73 65 |;.....}.|....else|
|00001910| 0d 0a 09 09 09 7b 0d 0a | 09 09 09 09 4d 61 73 68 |.....{..|....Mash|
|00001920| 2e 50 6c 61 79 53 6c 6f | 74 53 6f 75 6e 64 28 20 |.PlaySlo|tSound( |
|00001930| 4d 61 73 68 2e 53 6f 75 | 6e 64 54 61 62 6c 65 2e |Mash.Sou|ndTable.|
|00001940| 48 69 74 53 6f 66 74 53 | 6f 75 6e 64 53 6c 6f 74 |HitSoftS|oundSlot|
|00001950| 20 29 3b 0d 0a 09 09 09 | 7d 0d 0a 09 09 7d 0d 0a | );.....|}....}..|
|00001960| 09 7d 0d 0a 7d 0d 0a 0d | 0a 2f 2f 2d 2d 2d 2d 2d |.}..}...|.//-----|
|00001970| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00001980| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00001990| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000019a0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000019b0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 0d 0a 73 69 6d 75 6c |--------|-..simul|
|000019c0| 61 74 65 64 20 66 75 6e | 63 74 69 6f 6e 20 47 69 |ated fun|ction Gi|
|000019d0| 76 65 48 65 61 6c 74 68 | 28 20 4d 61 73 68 61 64 |veHealth|( Mashad|
|000019e0| 61 72 47 75 69 64 65 20 | 4d 61 73 68 2c 20 69 6e |arGuide |Mash, in|
|000019f0| 74 20 48 65 61 6c 74 68 | 20 29 0d 0a 7b 0d 0a 09 |t Health| )..{...|
|00001a00| 69 66 28 20 4d 61 73 68 | 61 64 61 72 53 6c 6f 74 |if( Mash|adarSlot|
|00001a10| 5b 4d 61 73 68 2e 49 6e | 64 65 78 5d 2e 4d 61 73 |[Mash.In|dex].Mas|
|00001a20| 68 61 64 61 72 48 65 61 | 6c 74 68 20 3e 20 30 20 |hadarHea|lth > 0 |
|00001a30| 26 26 0d 0a 09 09 4d 61 | 73 68 61 64 61 72 53 6c |&&....Ma|shadarSl|
|00001a40| 6f 74 5b 4d 61 73 68 2e | 49 6e 64 65 78 5d 2e 4d |ot[Mash.|Index].M|
|00001a50| 61 73 68 61 64 61 72 48 | 65 61 6c 74 68 20 3c 20 |ashadarH|ealth < |
|00001a60| 4d 61 73 68 61 64 61 72 | 4d 61 78 48 65 61 6c 74 |Mashadar|MaxHealt|
|00001a70| 68 20 29 0d 0a 09 7b 0d | 0a 09 09 4d 61 73 68 61 |h )...{.|...Masha|
|00001a80| 64 61 72 53 6c 6f 74 5b | 4d 61 73 68 2e 49 6e 64 |darSlot[|Mash.Ind|
|00001a90| 65 78 5d 2e 4d 61 73 68 | 61 64 61 72 48 65 61 6c |ex].Mash|adarHeal|
|00001aa0| 74 68 20 2b 3d 20 48 65 | 61 6c 74 68 3b 0d 0a 09 |th += He|alth;...|
|00001ab0| 7d 0d 0a 7d 0d 0a 0d 0a | 2f 2f 2d 2d 2d 2d 2d 2d |}..}....|//------|
|00001ac0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00001ad0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00001ae0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00001af0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00001b00| 2d 2d 2d 2d 2d 2d 2d 2d | 0d 0a 73 69 6d 75 6c 61 |--------|..simula|
|00001b10| 74 65 64 20 66 75 6e 63 | 74 69 6f 6e 20 69 6e 74 |ted func|tion int|
|00001b20| 20 47 65 74 4d 61 73 68 | 61 64 61 72 48 65 61 6c | GetMash|adarHeal|
|00001b30| 74 68 28 20 69 6e 74 20 | 49 6e 64 65 78 20 29 0d |th( int |Index ).|
|00001b40| 0a 7b 0d 0a 09 72 65 74 | 75 72 6e 20 4d 61 73 68 |.{...ret|urn Mash|
|00001b50| 61 64 61 72 53 6c 6f 74 | 5b 49 6e 64 65 78 5d 2e |adarSlot|[Index].|
|00001b60| 4d 61 73 68 61 64 61 72 | 48 65 61 6c 74 68 3b 0d |Mashadar|Health;.|
|00001b70| 0a 7d 0d 0a 0d 0a 2f 2f | 2d 2d 2d 2d 2d 2d 2d 2d |.}....//|--------|
|00001b80| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00001b90| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00001ba0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00001bb0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00001bc0| 2d 2d 2d 2d 2d 2d 0d 0a | 73 69 6d 75 6c 61 74 65 |------..|simulate|
|00001bd0| 64 20 66 75 6e 63 74 69 | 6f 6e 20 62 6f 6f 6c 20 |d functi|on bool |
|00001be0| 49 73 43 6c 6f 73 65 54 | 6f 53 65 61 6c 28 20 76 |IsCloseT|oSeal( v|
|00001bf0| 65 63 74 6f 72 20 53 6f | 75 72 63 65 4c 6f 63 61 |ector So|urceLoca|
|00001c00| 74 69 6f 6e 2c 20 6f 70 | 74 69 6f 6e 61 6c 20 66 |tion, op|tional f|
|00001c10| 6c 6f 61 74 20 52 61 64 | 69 75 73 20 29 0d 0a 7b |loat Rad|ius )..{|
|00001c20| 0d 0a 09 6c 6f 63 61 6c | 20 53 65 61 6c 20 69 53 |...local| Seal iS|
|00001c30| 65 61 6c 3b 0d 0a 09 6c | 6f 63 61 6c 20 76 65 63 |eal;...l|ocal vec|
|00001c40| 74 6f 72 20 69 4c 6f 63 | 3b 0d 0a 0d 0a 09 2f 2f |tor iLoc|;.....//|
|00001c50| 20 44 65 66 61 75 6c 74 | 20 74 6f 20 53 65 61 6c | Default| to Seal|
|00001c60| 47 75 61 72 64 52 61 64 | 69 75 73 2e 0d 0a 09 69 |GuardRad|ius....i|
|00001c70| 66 28 20 52 61 64 69 75 | 73 20 3d 3d 20 30 2e 30 |f( Radiu|s == 0.0|
|00001c80| 20 29 0d 0a 09 7b 0d 0a | 09 09 52 61 64 69 75 73 | )...{..|..Radius|
|00001c90| 20 3d 20 53 65 61 6c 47 | 75 61 72 64 52 61 64 69 | = SealG|uardRadi|
|00001ca0| 75 73 3b 0d 0a 09 7d 0d | 0a 0d 0a 09 2f 2f 44 4d |us;...}.|....//DM|
|00001cb0| 28 20 53 65 6c 66 24 22 | 3a 3a 49 73 43 6c 6f 73 |( Self$"|::IsClos|
|00001cc0| 65 54 6f 53 65 61 6c 28 | 29 20 52 61 64 69 75 73 |eToSeal(|) Radius|
|00001cd0| 20 3d 20 22 24 52 61 64 | 69 75 73 20 29 3b 0d 0a | = "$Rad|ius );..|
|00001ce0| 0d 0a 09 2f 2f 20 4e 4f | 54 45 5b 61 6c 65 69 62 |...// NO|TE[aleib|
|00001cf0| 79 5d 3a 20 4f 70 74 69 | 6d 69 7a 65 20 75 73 69 |y]: Opti|mize usi|
|00001d00| 6e 67 20 61 6e 20 49 74 | 65 6d 43 6f 6c 6c 65 63 |ng an It|emCollec|
|00001d10| 74 6f 72 20 6f 72 20 73 | 6f 6d 65 74 68 69 6e 67 |tor or s|omething|
|00001d20| 20 73 69 6d 69 6c 61 72 | 20 74 6f 20 50 61 77 6e | similar| to Pawn|
|00001d30| 4c 69 73 74 73 2e 0d 0a | 09 66 6f 72 65 61 63 68 |Lists...|.foreach|
|00001d40| 20 41 6c 6c 41 63 74 6f | 72 73 28 20 63 6c 61 73 | AllActo|rs( clas|
|00001d50| 73 27 53 65 61 6c 27 2c | 20 69 53 65 61 6c 20 29 |s'Seal',| iSeal )|
|00001d60| 0d 0a 09 7b 0d 0a 09 09 | 2f 2f 44 4d 28 20 53 65 |...{....|//DM( Se|
|00001d70| 6c 66 24 22 3a 3a 46 6f | 75 6e 64 20 22 24 69 53 |lf$"::Fo|und "$iS|
|00001d80| 65 61 6c 24 22 3a 20 4f | 77 6e 65 72 3a 20 22 24 |eal$": O|wner: "$|
|00001d90| 69 53 65 61 6c 2e 4f 77 | 6e 65 72 20 29 3b 0d 0a |iSeal.Ow|ner );..|
|00001da0| 0d 0a 09 09 69 66 28 20 | 69 53 65 61 6c 2e 4f 77 |....if( |iSeal.Ow|
|00001db0| 6e 65 72 20 21 3d 20 4e | 6f 6e 65 20 29 0d 0a 09 |ner != N|one )...|
|00001dc0| 09 7b 0d 0a 09 09 09 69 | 4c 6f 63 20 3d 20 69 53 |.{.....i|Loc = iS|
|00001dd0| 65 61 6c 2e 4f 77 6e 65 | 72 2e 4c 6f 63 61 74 69 |eal.Owne|r.Locati|
|00001de0| 6f 6e 3b 0d 0a 09 09 7d | 0d 0a 09 09 65 6c 73 65 |on;....}|....else|
|00001df0| 0d 0a 09 09 7b 0d 0a 09 | 09 09 69 4c 6f 63 20 3d |....{...|..iLoc =|
|00001e00| 20 69 53 65 61 6c 2e 4c | 6f 63 61 74 69 6f 6e 3b | iSeal.L|ocation;|
|00001e10| 0d 0a 09 09 7d 0d 0a 0d | 0a 09 09 69 66 28 20 56 |....}...|...if( V|
|00001e20| 53 69 7a 65 28 20 53 6f | 75 72 63 65 4c 6f 63 61 |Size( So|urceLoca|
|00001e30| 74 69 6f 6e 20 2d 20 69 | 4c 6f 63 20 29 20 3c 3d |tion - i|Loc ) <=|
|00001e40| 20 52 61 64 69 75 73 20 | 29 0d 0a 09 09 7b 0d 0a | Radius |)....{..|
|00001e50| 09 09 09 72 65 74 75 72 | 6e 20 74 72 75 65 3b 0d |...retur|n true;.|
|00001e60| 0a 09 09 7d 0d 0a 09 7d | 0d 0a 0d 0a 09 72 65 74 |...}...}|.....ret|
|00001e70| 75 72 6e 20 66 61 6c 73 | 65 3b 0d 0a 7d 0d 0a 0d |urn fals|e;..}...|
|00001e80| 0a 2f 2f 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |.//-----|--------|
|00001e90| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00001ea0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00001eb0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00001ec0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00001ed0| 2d 0d 0a 2f 2f 20 4d 61 | 73 68 61 64 61 72 20 6d |-..// Ma|shadar m|
|00001ee0| 61 79 20 6e 6f 74 20 61 | 63 74 69 76 61 74 65 20 |ay not a|ctivate |
|00001ef0| 74 68 65 6d 73 65 6c 76 | 65 73 2e 20 20 0d 0a 2f |themselv|es. ../|
|00001f00| 2f 20 54 68 65 79 20 6d | 75 73 74 20 64 6f 20 73 |/ They m|ust do s|
|00001f10| 6f 20 74 68 72 6f 75 67 | 68 20 74 68 69 73 20 66 |o throug|h this f|
|00001f20| 75 6e 63 74 69 6f 6e 2e | 0d 0a 2f 2f 2d 2d 2d 2d |unction.|..//----|
|00001f30| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00001f40| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00001f50| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00001f60| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00001f70| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 0d 0a 73 69 6d 75 |--------|--..simu|
|00001f80| 6c 61 74 65 64 20 66 75 | 6e 63 74 69 6f 6e 20 52 |lated fu|nction R|
|00001f90| 65 71 75 65 73 74 41 63 | 74 69 76 61 74 69 6f 6e |equestAc|tivation|
|00001fa0| 28 20 4d 61 73 68 61 64 | 61 72 47 75 69 64 65 20 |( Mashad|arGuide |
|00001fb0| 4d 61 73 68 2c 20 41 63 | 74 6f 72 20 44 65 73 69 |Mash, Ac|tor Desi|
|00001fc0| 72 65 64 56 69 63 74 69 | 6d 20 29 0d 0a 7b 0d 0a |redVicti|m )..{..|
|00001fd0| 09 6c 6f 63 61 6c 20 69 | 6e 74 20 69 3b 0d 0a 09 |.local i|nt i;...|
|00001fe0| 6c 6f 63 61 6c 20 69 6e | 74 20 47 75 61 72 64 49 |local in|t GuardI|
|00001ff0| 44 3b 0d 0a 09 6c 6f 63 | 61 6c 20 50 61 77 6e 20 |D;...loc|al Pawn |
|00002000| 49 74 65 72 50 3b 0d 0a | 09 0d 0a 09 2f 2f 44 4d |IterP;..|....//DM|
|00002010| 28 20 4d 61 73 68 24 22 | 20 72 65 71 75 65 73 74 |( Mash$"| request|
|00002020| 69 6e 67 20 61 63 74 69 | 76 61 74 69 6f 6e 20 74 |ing acti|vation t|
|00002030| 6f 20 67 6f 20 61 66 74 | 65 72 20 22 24 44 65 73 |o go aft|er "$Des|
|00002040| 69 72 65 64 56 69 63 74 | 69 6d 20 29 3b 0d 0a 09 |iredVict|im );...|
|00002050| 0d 0a 09 2f 2f 20 46 69 | 6e 64 20 74 68 65 20 66 |...// Fi|nd the f|
|00002060| 69 72 73 74 20 6e 6f 6e | 2d 61 63 74 69 76 65 20 |irst non|-active |
|00002070| 6d 61 73 68 61 64 61 72 | 20 73 6c 6f 74 20 77 69 |mashadar| slot wi|
|00002080| 74 68 20 68 65 61 6c 74 | 68 20 6c 65 66 74 2e 0d |th healt|h left..|
|00002090| 0a 09 66 6f 72 28 20 69 | 20 3d 20 30 3b 20 69 20 |..for( i| = 0; i |
|000020a0| 3c 20 4d 61 78 41 63 74 | 69 76 65 4d 61 73 68 61 |< MaxAct|iveMasha|
|000020b0| 64 61 72 3b 20 69 2b 2b | 20 29 0d 0a 09 7b 0d 0a |dar; i++| )...{..|
|000020c0| 09 09 69 66 28 20 4d 61 | 73 68 61 64 61 72 53 6c |..if( Ma|shadarSl|
|000020d0| 6f 74 5b 69 5d 2e 41 63 | 74 69 76 65 20 3d 3d 20 |ot[i].Ac|tive == |
|000020e0| 30 20 26 26 20 4d 61 73 | 68 61 64 61 72 53 6c 6f |0 && Mas|hadarSlo|
|000020f0| 74 5b 69 5d 2e 4d 61 73 | 68 61 64 61 72 48 65 61 |t[i].Mas|hadarHea|
|00002100| 6c 74 68 20 3e 20 30 20 | 29 0d 0a 09 09 7b 0d 0a |lth > 0 |)....{..|
|00002110| 09 09 09 4d 61 73 68 61 | 64 61 72 53 6c 6f 74 5b |...Masha|darSlot[|
|00002120| 69 5d 2e 41 63 74 69 76 | 65 20 3d 20 31 3b 0d 0a |i].Activ|e = 1;..|
|00002130| 09 09 09 4d 61 73 68 2e | 49 6e 64 65 78 20 3d 20 |...Mash.|Index = |
|00002140| 69 3b 0d 0a 0d 0a 09 09 | 09 69 66 28 20 41 72 65 |i;......|.if( Are|
|00002150| 6e 61 4d 61 73 68 61 64 | 61 72 50 61 77 6e 49 6e |naMashad|arPawnIn|
|00002160| 74 65 72 66 61 63 65 20 | 21 3d 20 4e 6f 6e 65 20 |terface |!= None |
|00002170| 29 0d 0a 09 09 09 7b 0d | 0a 09 09 09 09 4d 61 73 |).....{.|.....Mas|
|00002180| 68 2e 49 6e 73 74 69 67 | 61 74 6f 72 20 3d 20 41 |h.Instig|ator = A|
|00002190| 72 65 6e 61 4d 61 73 68 | 61 64 61 72 50 61 77 6e |renaMash|adarPawn|
|000021a0| 49 6e 74 65 72 66 61 63 | 65 3b 0d 0a 09 09 09 7d |Interfac|e;.....}|
|000021b0| 0d 0a 09 09 09 65 6c 73 | 65 0d 0a 09 09 09 7b 0d |.....els|e.....{.|
|000021c0| 0a 09 09 09 09 66 6f 72 | 28 20 49 74 65 72 50 20 |.....for|( IterP |
|000021d0| 3d 20 4c 65 76 65 6c 2e | 50 61 77 6e 4c 69 73 74 |= Level.|PawnList|
|000021e0| 3b 20 49 74 65 72 50 20 | 21 3d 20 4e 6f 6e 65 3b |; IterP |!= None;|
|000021f0| 20 49 74 65 72 50 20 3d | 20 49 74 65 72 50 2e 4e | IterP =| IterP.N|
|00002200| 65 78 74 50 61 77 6e 20 | 29 0d 0a 09 09 09 09 7b |extPawn |)......{|
|00002210| 0d 0a 09 09 09 09 09 69 | 66 0d 0a 09 09 09 09 09 |.......i|f.......|
|00002220| 28 09 4d 61 73 68 61 64 | 61 72 46 6f 63 75 73 50 |(.Mashad|arFocusP|
|00002230| 61 77 6e 28 49 74 65 72 | 50 29 20 21 3d 20 4e 6f |awn(Iter|P) != No|
|00002240| 6e 65 20 0d 0a 09 09 09 | 09 09 26 26 09 49 74 65 |ne .....|..&&.Ite|
|00002250| 72 50 2e 54 61 67 20 21 | 3d 20 27 41 6e 67 72 65 |rP.Tag !|= 'Angre|
|00002260| 61 6c 53 70 61 77 6e 65 | 64 27 0d 0a 09 09 09 09 |alSpawne|d'......|
|00002270| 09 26 26 09 49 74 65 72 | 50 2e 50 6c 61 79 65 72 |.&&.Iter|P.Player|
|00002280| 52 65 70 6c 69 63 61 74 | 69 6f 6e 49 6e 66 6f 2e |Replicat|ionInfo.|
|00002290| 54 65 61 6d 20 3d 3d 20 | 54 65 61 6d 0d 0a 09 09 |Team == |Team....|
|000022a0| 09 09 09 29 0d 0a 09 09 | 09 09 09 7b 0d 0a 09 09 |...)....|...{....|
|000022b0| 09 09 09 09 4d 61 73 68 | 2e 49 6e 73 74 69 67 61 |....Mash|.Instiga|
|000022c0| 74 6f 72 20 3d 20 49 74 | 65 72 50 3b 0d 0a 09 09 |tor = It|erP;....|
|000022d0| 09 09 09 09 62 72 65 61 | 6b 3b 0d 0a 09 09 09 09 |....brea|k;......|
|000022e0| 09 7d 0d 0a 09 09 09 09 | 7d 0d 0a 09 09 09 7d 0d |.}......|}.....}.|
|000022f0| 0a 0d 0a 09 09 09 4d 61 | 73 68 2e 41 63 74 69 76 |......Ma|sh.Activ|
|00002300| 61 74 65 28 29 3b 0d 0a | 09 09 09 2f 2f 44 4d 28 |ate();..|...//DM(|
|00002310| 20 22 41 63 74 69 76 61 | 74 69 6e 67 20 4d 61 73 | "Activa|ting Mas|
|00002320| 68 61 64 61 72 47 75 69 | 64 65 3a 20 22 24 4d 61 |hadarGui|de: "$Ma|
|00002330| 73 68 20 29 3b 0d 0a 09 | 09 09 72 65 74 75 72 6e |sh );...|..return|
|00002340| 3b 09 2f 2f 20 4e 6f 20 | 6e 65 65 64 20 74 6f 20 |;.// No |need to |
|00002350| 67 6f 20 6f 6e 2e 0d 0a | 09 09 7d 0d 0a 09 7d 0d |go on...|..}...}.|
|00002360| 0a 0d 0a 2f 2a 4f 42 45 | 3a 20 4f 72 64 65 72 73 |.../*OBE|: Orders|
|00002370| 20 61 72 65 20 61 75 74 | 6f 6d 61 74 69 63 20 6e | are aut|omatic n|
|00002380| 6f 77 2c 20 73 6f 20 4d | 61 73 68 61 64 61 72 20 |ow, so M|ashadar |
|00002390| 64 6f 65 73 6e 27 74 20 | 6e 65 65 64 20 74 6f 20 |doesn't |need to |
|000023a0| 6f 62 65 79 20 6f 72 64 | 65 72 73 2e 0d 0a 09 2f |obey ord|ers..../|
|000023b0| 2f 20 56 61 6c 69 64 61 | 74 65 20 69 6e 70 75 74 |/ Valida|te input|
|000023c0| 2e 0d 0a 09 69 66 28 20 | 44 65 73 69 72 65 64 56 |....if( |DesiredV|
|000023d0| 69 63 74 69 6d 20 3d 3d | 20 4e 6f 6e 65 20 29 0d |ictim ==| None ).|
|000023e0| 0a 09 7b 0d 0a 09 09 2f | 2f 44 4d 28 20 53 65 6c |..{..../|/DM( Sel|
|000023f0| 66 24 22 3a 3a 52 65 71 | 75 65 73 74 41 63 74 69 |f$"::Req|uestActi|
|00002400| 76 61 74 69 6f 6e 28 29 | 20 2d 2d 20 49 6e 76 61 |vation()| -- Inva|
|00002410| 6c 69 64 20 69 6e 70 75 | 74 2e 22 20 29 3b 0d 0a |lid inpu|t." );..|
|00002420| 09 09 72 65 74 75 72 6e | 3b 0d 0a 09 7d 0d 0a 0d |..return|;...}...|
|00002430| 0a 09 2f 2f 20 49 66 20 | 74 68 65 72 65 20 77 65 |..// If |there we|
|00002440| 72 65 6e 27 74 20 61 6e | 79 20 66 72 65 65 20 6d |ren't an|y free m|
|00002450| 61 73 68 61 64 61 72 20 | 73 6c 6f 74 73 2c 20 73 |ashadar |slots, s|
|00002460| 65 65 20 69 66 20 77 65 | 20 6e 65 65 64 20 74 6f |ee if we| need to|
|00002470| 20 61 63 74 69 76 61 74 | 65 20 69 74 20 0d 0a 09 | activat|e it ...|
|00002480| 2f 2f 20 61 6e 79 77 61 | 79 20 66 6f 72 20 69 74 |// anywa|y for it|
|00002490| 20 74 6f 20 67 75 61 72 | 64 20 61 20 70 6f 69 6e | to guar|d a poin|
|000024a0| 74 2f 61 63 74 6f 72 2e | 0d 0a 09 47 75 61 72 64 |t/actor.|...Guard|
|000024b0| 49 44 20 3d 20 43 6c 61 | 69 6d 47 75 61 72 64 28 |ID = Cla|imGuard(|
|000024c0| 20 44 65 73 69 72 65 64 | 56 69 63 74 69 6d 20 29 | Desired|Victim )|
|000024d0| 3b 0d 0a 09 2f 2f 44 4d | 28 20 22 43 6c 61 69 6d |;...//DM|( "Claim|
|000024e0| 69 6e 67 20 67 75 61 72 | 64 20 69 64 3a 20 22 24 |ing guar|d id: "$|
|000024f0| 47 75 61 72 64 49 44 20 | 29 3b 0d 0a 09 69 66 28 |GuardID |);...if(|
|00002500| 20 47 75 61 72 64 49 44 | 20 21 3d 20 63 6c 61 73 | GuardID| != clas|
|00002510| 73 27 4d 61 73 68 61 64 | 61 72 47 75 69 64 65 27 |s'Mashad|arGuide'|
|00002520| 2e 64 65 66 61 75 6c 74 | 2e 47 75 61 72 64 49 44 |.default|.GuardID|
|00002530| 20 29 0d 0a 09 7b 0d 0a | 09 09 4d 61 73 68 2e 47 | )...{..|..Mash.G|
|00002540| 75 61 72 64 49 44 20 3d | 20 47 75 61 72 64 49 44 |uardID =| GuardID|
|00002550| 3b 0d 0a 09 09 4d 61 73 | 68 2e 41 63 74 69 76 61 |;....Mas|h.Activa|
|00002560| 74 65 28 29 3b 0d 0a 09 | 09 2f 2f 44 4d 28 20 22 |te();...|.//DM( "|
|00002570| 41 63 74 69 76 61 74 69 | 6e 67 20 4d 61 73 68 61 |Activati|ng Masha|
|00002580| 64 61 72 47 75 69 64 65 | 20 28 66 6f 72 20 67 75 |darGuide| (for gu|
|00002590| 61 72 64 69 6e 67 20 70 | 75 72 70 6f 73 65 73 29 |arding p|urposes)|
|000025a0| 3a 20 22 24 4d 61 73 68 | 20 29 3b 0d 0a 09 09 72 |: "$Mash| );....r|
|000025b0| 65 74 75 72 6e 3b 0d 0a | 09 7d 0d 0a 0d 0a 09 2f |eturn;..|.}...../|
|000025c0| 2f 20 49 66 20 74 68 65 | 72 65 20 61 72 65 20 73 |/ If the|re are s|
|000025d0| 65 61 6c 73 20 74 6f 20 | 67 75 61 72 64 2c 20 77 |eals to |guard, w|
|000025e0| 65 20 68 61 64 20 62 65 | 74 74 65 72 20 70 72 6f |e had be|tter pro|
|000025f0| 74 65 63 74 20 74 68 65 | 6d 2e 0d 0a 09 2f 2f 44 |tect the|m....//D|
|00002600| 4d 28 20 22 53 65 61 6c | 20 67 75 61 72 64 20 63 |M( "Seal| guard c|
|00002610| 68 65 63 6b 2e 20 20 53 | 65 61 6c 47 75 61 72 64 |heck. S|ealGuard|
|00002620| 43 6f 75 6e 74 3a 20 22 | 24 53 65 61 6c 47 75 61 |Count: "|$SealGua|
|00002630| 72 64 43 6f 75 6e 74 20 | 29 3b 0d 0a 09 69 66 28 |rdCount |);...if(|
|00002640| 20 53 65 61 6c 47 75 61 | 72 64 43 6f 75 6e 74 20 | SealGua|rdCount |
|00002650| 3e 20 30 20 26 26 20 49 | 73 43 6c 6f 73 65 54 6f |> 0 && I|sCloseTo|
|00002660| 53 65 61 6c 28 20 44 65 | 73 69 72 65 64 56 69 63 |Seal( De|siredVic|
|00002670| 74 69 6d 2e 4c 6f 63 61 | 74 69 6f 6e 20 29 20 29 |tim.Loca|tion ) )|
|00002680| 0d 0a 09 7b 0d 0a 09 09 | 44 65 63 72 65 6d 65 6e |...{....|Decremen|
|00002690| 74 53 65 61 6c 47 75 61 | 72 64 43 6f 75 6e 74 28 |tSealGua|rdCount(|
|000026a0| 29 3b 0d 0a 09 09 4d 61 | 73 68 2e 47 75 61 72 64 |);....Ma|sh.Guard|
|000026b0| 49 44 20 3d 20 63 6c 61 | 73 73 27 4d 61 73 68 61 |ID = cla|ss'Masha|
|000026c0| 64 61 72 47 75 69 64 65 | 27 2e 64 65 66 61 75 6c |darGuide|'.defaul|
|000026d0| 74 2e 47 75 61 72 64 53 | 65 61 6c 49 44 3b 0d 0a |t.GuardS|ealID;..|
|000026e0| 09 09 4d 61 73 68 2e 41 | 63 74 69 76 61 74 65 28 |..Mash.A|ctivate(|
|000026f0| 29 3b 0d 0a 09 09 2f 2f | 44 4d 28 20 22 41 63 74 |);....//|DM( "Act|
|00002700| 69 76 61 74 69 6e 67 20 | 4d 61 73 68 61 64 61 72 |ivating |Mashadar|
|00002710| 47 75 69 64 65 20 28 74 | 6f 20 67 75 61 72 64 20 |Guide (t|o guard |
|00002720| 61 20 73 65 61 6c 29 3a | 20 22 24 4d 61 73 68 20 |a seal):| "$Mash |
|00002730| 29 3b 0d 0a 09 09 72 65 | 74 75 72 6e 3b 0d 0a 09 |);....re|turn;...|
|00002740| 7d 0d 0a 2a 2f 0d 0a 7d | 0d 0a 0d 0a 2f 2f 2d 2d |}..*/..}|....//--|
|00002750| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00002760| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00002770| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00002780| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00002790| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 0d 0a 2f 2f |--------|----..//|
|000027a0| 20 4e 6f 74 69 66 69 63 | 61 74 69 6f 6e 20 66 6f | Notific|ation fo|
|000027b0| 72 20 77 68 65 6e 20 61 | 20 4d 61 73 68 61 64 61 |r when a| Mashada|
|000027c0| 72 20 69 73 20 64 65 61 | 63 74 69 76 61 74 65 64 |r is dea|ctivated|
|000027d0| 2e 0d 0a 2f 2f 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |...//---|--------|
|000027e0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000027f0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00002800| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00002810| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00002820| 2d 2d 2d 0d 0a 73 69 6d | 75 6c 61 74 65 64 20 66 |---..sim|ulated f|
|00002830| 75 6e 63 74 69 6f 6e 20 | 4d 61 73 68 61 64 61 72 |unction |Mashadar|
|00002840| 44 65 61 63 74 69 76 61 | 74 65 64 28 20 4d 61 73 |Deactiva|ted( Mas|
|00002850| 68 61 64 61 72 47 75 69 | 64 65 20 4d 61 73 68 20 |hadarGui|de Mash |
|00002860| 29 0d 0a 7b 0d 0a 09 2f | 2f 44 4d 28 20 22 44 65 |)..{.../|/DM( "De|
|00002870| 41 63 74 69 76 61 74 69 | 6e 67 20 4d 61 73 68 61 |Activati|ng Masha|
|00002880| 64 61 72 47 75 69 64 65 | 3a 20 22 24 4d 61 73 68 |darGuide|: "$Mash|
|00002890| 20 29 3b 0d 0a 09 4d 61 | 73 68 61 64 61 72 53 6c | );...Ma|shadarSl|
|000028a0| 6f 74 5b 20 4d 61 73 68 | 2e 49 6e 64 65 78 20 5d |ot[ Mash|.Index ]|
|000028b0| 2e 41 63 74 69 76 65 20 | 3d 20 30 3b 0d 0a 09 69 |.Active |= 0;...i|
|000028c0| 66 28 20 4d 61 73 68 2e | 47 75 61 72 64 49 44 20 |f( Mash.|GuardID |
|000028d0| 21 3d 20 63 6c 61 73 73 | 27 4d 61 73 68 61 64 61 |!= class|'Mashada|
|000028e0| 72 47 75 69 64 65 27 2e | 64 65 66 61 75 6c 74 2e |rGuide'.|default.|
|000028f0| 47 75 61 72 64 49 44 20 | 29 0d 0a 09 7b 0d 0a 09 |GuardID |)...{...|
|00002900| 09 52 65 6c 65 61 73 65 | 43 6c 61 69 6d 28 20 4d |.Release|Claim( M|
|00002910| 61 73 68 2e 47 75 61 72 | 64 49 44 20 29 3b 0d 0a |ash.Guar|dID );..|
|00002920| 09 09 4d 61 73 68 2e 47 | 75 61 72 64 49 44 20 3d |..Mash.G|uardID =|
|00002930| 20 63 6c 61 73 73 27 4d | 61 73 68 61 64 61 72 47 | class'M|ashadarG|
|00002940| 75 69 64 65 27 2e 64 65 | 66 61 75 6c 74 2e 47 75 |uide'.de|fault.Gu|
|00002950| 61 72 64 49 44 3b 0d 0a | 09 7d 0d 0a 7d 0d 0a 0d |ardID;..|.}..}...|
|00002960| 0a 2f 2f 2f 2f 2f 2f 2f | 2f 2f 2f 2f 2f 0d 0a 2f |.///////|/////../|
|00002970| 2f 20 4f 72 64 65 72 73 | 20 2f 2f 0d 0a 2f 2f 2f |/ Orders| //..///|
|00002980| 2f 2f 2f 2f 2f 2f 2f 2f | 2f 0d 0a 0d 0a 2f 2f 2d |////////|/....//-|
|00002990| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000029a0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000029b0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000029c0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000029d0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 0d 0a 73 |--------|-----..s|
|000029e0| 69 6d 75 6c 61 74 65 64 | 20 66 75 6e 63 74 69 6f |imulated| functio|
|000029f0| 6e 20 49 6e 63 72 65 6d | 65 6e 74 53 65 61 6c 47 |n Increm|entSealG|
|00002a00| 75 61 72 64 43 6f 75 6e | 74 28 29 0d 0a 7b 0d 0a |uardCoun|t()..{..|
|00002a10| 09 53 65 61 6c 47 75 61 | 72 64 43 6f 75 6e 74 2b |.SealGua|rdCount+|
|00002a20| 2b 3b 0d 0a 09 2f 2f 2f | 2f 44 4d 28 20 53 65 6c |+;...///|/DM( Sel|
|00002a30| 66 24 22 3a 3a 49 6e 63 | 72 65 6d 65 6e 74 53 65 |f$"::Inc|rementSe|
|00002a40| 61 6c 47 75 61 72 64 43 | 6f 75 6e 74 28 29 3a 20 |alGuardC|ount(): |
|00002a50| 22 24 53 65 61 6c 47 75 | 61 72 64 43 6f 75 6e 74 |"$SealGu|ardCount|
|00002a60| 20 29 3b 0d 0a 7d 0d 0a | 0d 0a 2f 2f 2d 2d 2d 2d | );..}..|..//----|
|00002a70| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00002a80| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00002a90| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00002aa0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00002ab0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 0d 0a 73 69 6d 75 |--------|--..simu|
|00002ac0| 6c 61 74 65 64 20 66 75 | 6e 63 74 69 6f 6e 20 44 |lated fu|nction D|
|00002ad0| 65 63 72 65 6d 65 6e 74 | 53 65 61 6c 47 75 61 72 |ecrement|SealGuar|
|00002ae0| 64 43 6f 75 6e 74 28 29 | 0d 0a 7b 0d 0a 09 53 65 |dCount()|..{...Se|
|00002af0| 61 6c 47 75 61 72 64 43 | 6f 75 6e 74 2d 2d 3b 0d |alGuardC|ount--;.|
|00002b00| 0a 09 2f 2f 2f 2f 44 4d | 28 20 53 65 6c 66 24 22 |..////DM|( Self$"|
|00002b10| 3a 3a 44 65 63 72 65 6d | 65 6e 74 53 65 61 6c 47 |::Decrem|entSealG|
|00002b20| 75 61 72 64 43 6f 75 6e | 74 28 29 3a 20 22 24 53 |uardCoun|t(): "$S|
|00002b30| 65 61 6c 47 75 61 72 64 | 43 6f 75 6e 74 20 29 3b |ealGuard|Count );|
|00002b40| 0d 0a 7d 0d 0a 0d 0a 2f | 2f 2d 2d 2d 2d 2d 2d 2d |..}..../|/-------|
|00002b50| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00002b60| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00002b70| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00002b80| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00002b90| 2d 2d 2d 2d 2d 2d 2d 0d | 0a 73 69 6d 75 6c 61 74 |-------.|.simulat|
|00002ba0| 65 64 20 66 75 6e 63 74 | 69 6f 6e 20 69 6e 74 20 |ed funct|ion int |
|00002bb0| 41 64 64 47 75 61 72 64 | 50 6f 69 6e 74 28 20 76 |AddGuard|Point( v|
|00002bc0| 65 63 74 6f 72 20 4c 6f | 63 20 29 0d 0a 7b 0d 0a |ector Lo|c )..{..|
|00002bd0| 09 6c 6f 63 61 6c 20 69 | 6e 74 20 69 3b 0d 0a 09 |.local i|nt i;...|
|00002be0| 6c 6f 63 61 6c 20 69 6e | 74 20 47 75 61 72 64 49 |local in|t GuardI|
|00002bf0| 44 3b 0d 0a 0d 0a 09 2f | 2f 2f 2f 44 4d 28 20 53 |D;...../|///DM( S|
|00002c00| 65 6c 66 24 22 3a 3a 41 | 64 64 47 75 61 72 64 50 |elf$"::A|ddGuardP|
|00002c10| 6f 69 6e 74 28 29 3a 20 | 22 24 4c 6f 63 20 29 3b |oint(): |"$Loc );|
|00002c20| 0d 0a 0d 0a 09 47 75 61 | 72 64 49 44 20 3d 20 63 |.....Gua|rdID = c|
|00002c30| 6c 61 73 73 27 4d 61 73 | 68 61 64 61 72 47 75 69 |lass'Mas|hadarGui|
|00002c40| 64 65 27 2e 64 65 66 61 | 75 6c 74 2e 47 75 61 72 |de'.defa|ult.Guar|
|00002c50| 64 49 44 3b 0d 0a 0d 0a | 09 66 6f 72 28 20 69 20 |dID;....|.for( i |
|00002c60| 3d 20 30 3b 20 69 20 3c | 20 41 72 72 61 79 43 6f |= 0; i <| ArrayCo|
|00002c70| 75 6e 74 28 47 75 61 72 | 64 44 61 74 61 29 3b 20 |unt(Guar|dData); |
|00002c80| 69 2b 2b 20 29 0d 0a 09 | 7b 0d 0a 09 09 69 66 28 |i++ )...|{....if(|
|00002c90| 20 47 75 61 72 64 44 61 | 74 61 5b 69 5d 2e 56 61 | GuardDa|ta[i].Va|
|00002ca0| 6c 69 64 20 3d 3d 20 30 | 20 29 0d 0a 09 09 7b 0d |lid == 0| )....{.|
|00002cb0| 0a 09 09 09 47 75 61 72 | 64 44 61 74 61 5b 69 5d |....Guar|dData[i]|
|00002cc0| 2e 47 75 61 72 64 50 6f | 69 6e 74 20 3d 20 4c 6f |.GuardPo|int = Lo|
|00002cd0| 63 3b 0d 0a 09 09 09 2f | 2f 69 66 28 20 47 75 61 |c;...../|/if( Gua|
|00002ce0| 72 64 44 61 74 61 5b 69 | 5d 2e 47 75 61 72 64 41 |rdData[i|].GuardA|
|00002cf0| 63 74 6f 72 20 21 3d 20 | 4e 6f 6e 65 20 29 20 7b |ctor != |None ) {|
|00002d00| 20 47 75 61 72 64 44 61 | 74 61 5b 69 5d 2e 47 75 | GuardDa|ta[i].Gu|
|00002d10| 61 72 64 41 63 74 6f 72 | 2e 44 65 74 61 63 68 44 |ardActor|.DetachD|
|00002d20| 65 73 74 72 6f 79 4f 62 | 73 65 72 76 65 72 28 20 |estroyOb|server( |
|00002d30| 53 65 6c 66 20 29 3b 20 | 7d 0d 0a 09 09 09 47 75 |Self ); |}.....Gu|
|00002d40| 61 72 64 44 61 74 61 5b | 69 5d 2e 47 75 61 72 64 |ardData[|i].Guard|
|00002d50| 41 63 74 6f 72 20 3d 20 | 4e 6f 6e 65 3b 0d 0a 09 |Actor = |None;...|
|00002d60| 09 09 47 75 61 72 64 44 | 61 74 61 5b 69 5d 2e 56 |..GuardD|ata[i].V|
|00002d70| 61 6c 69 64 20 3d 20 31 | 3b 0d 0a 09 09 09 47 75 |alid = 1|;.....Gu|
|00002d80| 61 72 64 49 44 20 3d 20 | 69 3b 0d 0a 09 09 09 62 |ardID = |i;.....b|
|00002d90| 72 65 61 6b 3b 0d 0a 09 | 09 7d 0d 0a 09 7d 0d 0a |reak;...|.}...}..|
|00002da0| 0d 0a 09 2f 2f 2f 2f 44 | 4d 28 20 53 65 6c 66 24 |...////D|M( Self$|
|00002db0| 22 3a 3a 47 75 61 72 64 | 49 44 20 3d 20 22 24 69 |"::Guard|ID = "$i|
|00002dc0| 20 29 3b 0d 0a 0d 0a 09 | 72 65 74 75 72 6e 20 47 | );.....|return G|
|00002dd0| 75 61 72 64 49 44 3b 0d | 0a 7d 0d 0a 0d 0a 2f 2f |uardID;.|.}....//|
|00002de0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00002df0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00002e00| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00002e10| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00002e20| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 0d 0a |--------|------..|
|00002e30| 2f 2f 20 52 65 74 75 72 | 6e 73 20 74 68 65 20 47 |// Retur|ns the G|
|00002e40| 75 61 72 64 49 44 20 6f | 66 20 74 68 65 20 6e 65 |uardID o|f the ne|
|00002e50| 77 6c 79 20 61 64 64 65 | 64 20 67 75 61 72 64 20 |wly adde|d guard |
|00002e60| 64 61 74 61 20 6f 72 20 | 63 6c 61 73 73 27 4d 61 |data or |class'Ma|
|00002e70| 73 68 61 64 61 72 47 75 | 69 64 65 27 2e 64 65 66 |shadarGu|ide'.def|
|00002e80| 61 75 6c 74 2e 47 75 61 | 72 64 49 44 20 28 2d 31 |ault.Gua|rdID (-1|
|00002e90| 29 20 6f 6e 20 66 61 69 | 6c 75 72 65 2e 0d 0a 2f |) on fai|lure.../|
|00002ea0| 2f 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |/-------|--------|
|00002eb0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00002ec0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00002ed0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00002ee0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 0d |--------|-------.|
|00002ef0| 0a 73 69 6d 75 6c 61 74 | 65 64 20 66 75 6e 63 74 |.simulat|ed funct|
|00002f00| 69 6f 6e 20 69 6e 74 20 | 41 64 64 47 75 61 72 64 |ion int |AddGuard|
|00002f10| 41 63 74 6f 72 28 20 41 | 63 74 6f 72 20 4f 74 68 |Actor( A|ctor Oth|
|00002f20| 65 72 20 29 0d 0a 7b 0d | 0a 09 6c 6f 63 61 6c 20 |er )..{.|..local |
|00002f30| 69 6e 74 20 69 3b 0d 0a | 09 6c 6f 63 61 6c 20 69 |int i;..|.local i|
|00002f40| 6e 74 20 47 75 61 72 64 | 49 44 3b 0d 0a 0d 0a 09 |nt Guard|ID;.....|
|00002f50| 2f 2f 2f 2f 44 4d 28 20 | 53 65 6c 66 24 22 3a 3a |////DM( |Self$"::|
|00002f60| 41 64 64 47 75 61 72 64 | 41 63 74 6f 72 28 29 3a |AddGuard|Actor():|
|00002f70| 20 22 24 4f 74 68 65 72 | 20 29 3b 0d 0a 0d 0a 09 | "$Other| );.....|
|00002f80| 47 75 61 72 64 49 44 20 | 3d 20 63 6c 61 73 73 27 |GuardID |= class'|
|00002f90| 4d 61 73 68 61 64 61 72 | 47 75 69 64 65 27 2e 64 |Mashadar|Guide'.d|
|00002fa0| 65 66 61 75 6c 74 2e 47 | 75 61 72 64 49 44 3b 0d |efault.G|uardID;.|
|00002fb0| 0a 0d 0a 09 66 6f 72 28 | 20 69 20 3d 20 30 3b 20 |....for(| i = 0; |
|00002fc0| 69 20 3c 20 41 72 72 61 | 79 43 6f 75 6e 74 28 47 |i < Arra|yCount(G|
|00002fd0| 75 61 72 64 44 61 74 61 | 29 3b 20 69 2b 2b 20 29 |uardData|); i++ )|
|00002fe0| 0d 0a 09 7b 0d 0a 09 09 | 69 66 28 20 47 75 61 72 |...{....|if( Guar|
|00002ff0| 64 44 61 74 61 5b 69 5d | 2e 56 61 6c 69 64 20 3d |dData[i]|.Valid =|
|00003000| 3d 20 30 20 29 0d 0a 09 | 09 7b 0d 0a 09 09 09 2f |= 0 )...|.{...../|
|00003010| 2f 69 66 28 20 47 75 61 | 72 64 44 61 74 61 5b 69 |/if( Gua|rdData[i|
|00003020| 5d 2e 47 75 61 72 64 41 | 63 74 6f 72 20 21 3d 20 |].GuardA|ctor != |
|00003030| 4e 6f 6e 65 20 29 20 7b | 20 47 75 61 72 64 44 61 |None ) {| GuardDa|
|00003040| 74 61 5b 69 5d 2e 47 75 | 61 72 64 41 63 74 6f 72 |ta[i].Gu|ardActor|
|00003050| 2e 44 65 74 61 63 68 44 | 65 73 74 72 6f 79 4f 62 |.DetachD|estroyOb|
|00003060| 73 65 72 76 65 72 28 20 | 53 65 6c 66 20 29 3b 20 |server( |Self ); |
|00003070| 7d 0d 0a 09 09 09 47 75 | 61 72 64 44 61 74 61 5b |}.....Gu|ardData[|
|00003080| 69 5d 2e 47 75 61 72 64 | 41 63 74 6f 72 20 3d 20 |i].Guard|Actor = |
|00003090| 4f 74 68 65 72 3b 0d 0a | 09 09 09 2f 2f 69 66 28 |Other;..|...//if(|
|000030a0| 20 47 75 61 72 64 44 61 | 74 61 5b 69 5d 2e 47 75 | GuardDa|ta[i].Gu|
|000030b0| 61 72 64 41 63 74 6f 72 | 20 21 3d 20 4e 6f 6e 65 |ardActor| != None|
|000030c0| 20 29 20 7b 20 47 75 61 | 72 64 44 61 74 61 5b 69 | ) { Gua|rdData[i|
|000030d0| 5d 2e 47 75 61 72 64 41 | 63 74 6f 72 2e 41 74 74 |].GuardA|ctor.Att|
|000030e0| 61 63 68 44 65 73 74 72 | 6f 79 4f 62 73 65 72 76 |achDestr|oyObserv|
|000030f0| 65 72 28 20 53 65 6c 66 | 20 29 3b 20 7d 0d 0a 09 |er( Self| ); }...|
|00003100| 09 09 47 75 61 72 64 44 | 61 74 61 5b 69 5d 2e 47 |..GuardD|ata[i].G|
|00003110| 75 61 72 64 50 6f 69 6e | 74 20 3d 20 76 65 63 74 |uardPoin|t = vect|
|00003120| 28 30 2c 30 2c 30 29 3b | 0d 0a 09 09 09 47 75 61 |(0,0,0);|.....Gua|
|00003130| 72 64 44 61 74 61 5b 69 | 5d 2e 56 61 6c 69 64 20 |rdData[i|].Valid |
|00003140| 3d 20 31 3b 0d 0a 09 09 | 09 47 75 61 72 64 49 44 |= 1;....|.GuardID|
|00003150| 20 3d 20 69 3b 0d 0a 09 | 09 09 62 72 65 61 6b 3b | = i;...|..break;|
|00003160| 0d 0a 09 09 7d 0d 0a 09 | 7d 0d 0a 0d 0a 09 2f 2f |....}...|}.....//|
|00003170| 2f 2f 44 4d 28 20 53 65 | 6c 66 24 22 3a 3a 47 75 |//DM( Se|lf$"::Gu|
|00003180| 61 72 64 49 44 20 3d 20 | 22 24 69 20 29 3b 0d 0a |ardID = |"$i );..|
|00003190| 0d 0a 09 72 65 74 75 72 | 6e 20 47 75 61 72 64 49 |...retur|n GuardI|
|000031a0| 44 3b 0d 0a 7d 0d 0a 0d | 0a 2f 2f 2d 2d 2d 2d 2d |D;..}...|.//-----|
|000031b0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000031c0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000031d0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000031e0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000031f0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 0d 0a 73 69 6d 75 6c |--------|-..simul|
|00003200| 61 74 65 64 20 66 75 6e | 63 74 69 6f 6e 20 52 65 |ated fun|ction Re|
|00003210| 6d 6f 76 65 47 75 61 72 | 64 50 6f 69 6e 74 28 20 |moveGuar|dPoint( |
|00003220| 76 65 63 74 6f 72 20 4c | 6f 63 2c 20 6f 70 74 69 |vector L|oc, opti|
|00003230| 6f 6e 61 6c 20 62 6f 6f | 6c 20 62 52 65 6d 6f 76 |onal boo|l bRemov|
|00003240| 65 41 6c 6c 4f 63 63 75 | 72 61 6e 63 65 73 20 29 |eAllOccu|rances )|
|00003250| 0d 0a 7b 0d 0a 09 6c 6f | 63 61 6c 20 69 6e 74 20 |..{...lo|cal int |
|00003260| 69 3b 0d 0a 0d 0a 09 2f | 2f 2f 2f 44 4d 28 20 53 |i;...../|///DM( S|
|00003270| 65 6c 66 24 22 3a 3a 52 | 65 6d 6f 76 65 47 75 61 |elf$"::R|emoveGua|
|00003280| 72 64 50 6f 69 6e 74 28 | 29 3a 20 22 24 4c 6f 63 |rdPoint(|): "$Loc|
|00003290| 20 29 3b 0d 0a 0d 0a 09 | 66 6f 72 28 20 69 20 3d | );.....|for( i =|
|000032a0| 20 30 3b 20 69 20 3c 20 | 41 72 72 61 79 43 6f 75 | 0; i < |ArrayCou|
|000032b0| 6e 74 28 47 75 61 72 64 | 44 61 74 61 29 3b 20 69 |nt(Guard|Data); i|
|000032c0| 2b 2b 20 29 0d 0a 09 7b | 0d 0a 09 09 69 66 0d 0a |++ )...{|....if..|
|000032d0| 09 09 28 09 47 75 61 72 | 64 44 61 74 61 5b 69 5d |..(.Guar|dData[i]|
|000032e0| 2e 56 61 6c 69 64 20 3d | 3d 20 31 0d 0a 09 09 26 |.Valid =|= 1....&|
|000032f0| 26 09 47 75 61 72 64 44 | 61 74 61 5b 69 5d 2e 47 |&.GuardD|ata[i].G|
|00003300| 75 61 72 64 41 63 74 6f | 72 20 3d 3d 20 4e 6f 6e |uardActo|r == Non|
|00003310| 65 0d 0a 09 09 26 26 09 | 63 6c 61 73 73 27 55 74 |e....&&.|class'Ut|
|00003320| 69 6c 27 2e 73 74 61 74 | 69 63 2e 56 65 63 74 41 |il'.stat|ic.VectA|
|00003330| 70 72 6f 78 45 71 75 61 | 6c 28 20 47 75 61 72 64 |proxEqua|l( Guard|
|00003340| 44 61 74 61 5b 69 5d 2e | 47 75 61 72 64 50 6f 69 |Data[i].|GuardPoi|
|00003350| 6e 74 2c 20 4c 6f 63 2c | 20 47 55 41 52 44 5f 50 |nt, Loc,| GUARD_P|
|00003360| 4f 49 4e 54 5f 41 4c 4c | 4f 57 41 4e 43 45 20 29 |OINT_ALL|OWANCE )|
|00003370| 0d 0a 09 09 29 0d 0a 09 | 09 7b 0d 0a 09 09 09 47 |....)...|.{.....G|
|00003380| 75 61 72 64 44 61 74 61 | 5b 69 5d 2e 47 75 61 72 |uardData|[i].Guar|
|00003390| 64 50 6f 69 6e 74 20 3d | 20 76 65 63 74 28 30 2c |dPoint =| vect(0,|
|000033a0| 30 2c 30 29 3b 0d 0a 09 | 09 09 47 75 61 72 64 44 |0,0);...|..GuardD|
|000033b0| 61 74 61 5b 69 5d 2e 56 | 61 6c 69 64 20 3d 20 30 |ata[i].V|alid = 0|
|000033c0| 3b 0d 0a 0d 0a 09 09 09 | 2f 2f 2f 2f 44 4d 28 20 |;.......|////DM( |
|000033d0| 53 65 6c 66 24 22 3a 3a | 47 75 61 72 64 49 44 20 |Self$"::|GuardID |
|000033e0| 3d 20 22 24 69 20 29 3b | 0d 0a 0d 0a 09 09 09 2f |= "$i );|......./|
|000033f0| 2f 20 53 68 6f 75 6c 64 | 20 77 65 20 63 6f 6e 74 |/ Should| we cont|
|00003400| 69 6e 75 65 20 6c 6f 6f | 6b 69 6e 67 20 66 6f 72 |inue loo|king for|
|00003410| 20 6d 61 74 63 68 65 73 | 3f 0d 0a 09 09 09 69 66 | matches|?.....if|
|00003420| 28 20 21 62 52 65 6d 6f | 76 65 41 6c 6c 4f 63 63 |( !bRemo|veAllOcc|
|00003430| 75 72 61 6e 63 65 73 20 | 29 20 62 72 65 61 6b 3b |urances |) break;|
|00003440| 0d 0a 09 09 7d 0d 0a 09 | 7d 0d 0a 7d 0d 0a 0d 0a |....}...|}..}....|
|00003450| 2f 2f 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |//------|--------|
|00003460| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00003470| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00003480| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00003490| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000034a0| 0d 0a 73 69 6d 75 6c 61 | 74 65 64 20 66 75 6e 63 |..simula|ted func|
|000034b0| 74 69 6f 6e 20 52 65 6d | 6f 76 65 47 75 61 72 64 |tion Rem|oveGuard|
|000034c0| 41 63 74 6f 72 28 20 41 | 63 74 6f 72 20 4f 74 68 |Actor( A|ctor Oth|
|000034d0| 65 72 2c 20 6f 70 74 69 | 6f 6e 61 6c 20 62 6f 6f |er, opti|onal boo|
|000034e0| 6c 20 62 52 65 6d 6f 76 | 65 41 6c 6c 4f 63 63 75 |l bRemov|eAllOccu|
|000034f0| 72 61 6e 63 65 73 20 29 | 0d 0a 7b 0d 0a 09 6c 6f |rances )|..{...lo|
|00003500| 63 61 6c 20 69 6e 74 20 | 69 3b 0d 0a 0d 0a 09 2f |cal int |i;...../|
|00003510| 2f 2f 2f 44 4d 28 20 53 | 65 6c 66 24 22 3a 3a 52 |///DM( S|elf$"::R|
|00003520| 65 6d 6f 76 65 47 75 61 | 72 64 41 63 74 6f 72 28 |emoveGua|rdActor(|
|00003530| 29 3a 20 22 24 4f 74 68 | 65 72 20 29 3b 0d 0a 0d |): "$Oth|er );...|
|00003540| 0a 09 66 6f 72 28 20 69 | 20 3d 20 30 3b 20 69 20 |..for( i| = 0; i |
|00003550| 3c 20 41 72 72 61 79 43 | 6f 75 6e 74 28 47 75 61 |< ArrayC|ount(Gua|
|00003560| 72 64 44 61 74 61 29 3b | 20 69 2b 2b 20 29 0d 0a |rdData);| i++ )..|
|00003570| 09 7b 0d 0a 09 09 69 66 | 0d 0a 09 09 28 09 47 75 |.{....if|....(.Gu|
|00003580| 61 72 64 44 61 74 61 5b | 69 5d 2e 56 61 6c 69 64 |ardData[|i].Valid|
|00003590| 20 3d 3d 20 31 0d 0a 09 | 09 26 26 09 47 75 61 72 | == 1...|.&&.Guar|
|000035a0| 64 44 61 74 61 5b 69 5d | 2e 47 75 61 72 64 41 63 |dData[i]|.GuardAc|
|000035b0| 74 6f 72 20 3d 3d 20 4f | 74 68 65 72 0d 0a 09 09 |tor == O|ther....|
|000035c0| 29 0d 0a 09 09 7b 0d 0a | 09 09 09 2f 2f 69 66 28 |)....{..|...//if(|
|000035d0| 20 47 75 61 72 64 44 61 | 74 61 5b 69 5d 2e 47 75 | GuardDa|ta[i].Gu|
|000035e0| 61 72 64 41 63 74 6f 72 | 20 21 3d 20 4e 6f 6e 65 |ardActor| != None|
|000035f0| 20 29 20 7b 20 47 75 61 | 72 64 44 61 74 61 5b 69 | ) { Gua|rdData[i|
|00003600| 5d 2e 47 75 61 72 64 41 | 63 74 6f 72 2e 44 65 74 |].GuardA|ctor.Det|
|00003610| 61 63 68 44 65 73 74 72 | 6f 79 4f 62 73 65 72 76 |achDestr|oyObserv|
|00003620| 65 72 28 20 53 65 6c 66 | 20 29 3b 20 7d 0d 0a 09 |er( Self| ); }...|
|00003630| 09 09 47 75 61 72 64 44 | 61 74 61 5b 69 5d 2e 47 |..GuardD|ata[i].G|
|00003640| 75 61 72 64 41 63 74 6f | 72 20 3d 20 4e 6f 6e 65 |uardActo|r = None|
|00003650| 3b 0d 0a 09 09 09 47 75 | 61 72 64 44 61 74 61 5b |;.....Gu|ardData[|
|00003660| 69 5d 2e 47 75 61 72 64 | 50 6f 69 6e 74 20 3d 20 |i].Guard|Point = |
|00003670| 76 65 63 74 28 30 2c 30 | 2c 30 29 3b 0d 0a 09 09 |vect(0,0|,0);....|
|00003680| 09 47 75 61 72 64 44 61 | 74 61 5b 69 5d 2e 56 61 |.GuardDa|ta[i].Va|
|00003690| 6c 69 64 20 3d 20 30 3b | 0d 0a 0d 0a 09 09 09 2f |lid = 0;|......./|
|000036a0| 2f 2f 2f 44 4d 28 20 53 | 65 6c 66 24 22 3a 3a 47 |///DM( S|elf$"::G|
|000036b0| 75 61 72 64 49 44 20 3d | 20 22 24 69 20 29 3b 0d |uardID =| "$i );.|
|000036c0| 0a 09 09 09 0d 0a 09 09 | 09 2f 2f 20 53 68 6f 75 |........|.// Shou|
|000036d0| 6c 64 20 77 65 20 63 6f | 6e 74 69 6e 75 65 20 6c |ld we co|ntinue l|
|000036e0| 6f 6f 6b 69 6e 67 20 66 | 6f 72 20 6d 61 74 63 68 |ooking f|or match|
|000036f0| 65 73 3f 0d 0a 09 09 09 | 69 66 28 20 21 62 52 65 |es?.....|if( !bRe|
|00003700| 6d 6f 76 65 41 6c 6c 4f | 63 63 75 72 61 6e 63 65 |moveAllO|ccurance|
|00003710| 73 20 29 20 62 72 65 61 | 6b 3b 0d 0a 09 09 7d 0d |s ) brea|k;....}.|
|00003720| 0a 09 7d 0d 0a 7d 0d 0a | 0d 0a 2f 2a 0d 0a 2f 2f |..}..}..|../*..//|
|00003730| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00003740| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00003750| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00003760| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00003770| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 0d 0a |--------|------..|
|00003780| 73 69 6d 75 6c 61 74 65 | 64 20 66 75 6e 63 74 69 |simulate|d functi|
|00003790| 6f 6e 20 53 75 62 6a 65 | 63 74 44 65 73 74 72 6f |on Subje|ctDestro|
|000037a0| 79 65 64 28 20 4f 62 6a | 65 63 74 20 53 75 62 6a |yed( Obj|ect Subj|
|000037b0| 65 63 74 20 29 0d 0a 7b | 0d 0a 09 52 65 6d 6f 76 |ect )..{|...Remov|
|000037c0| 65 47 75 61 72 64 41 63 | 74 6f 72 28 20 53 75 62 |eGuardAc|tor( Sub|
|000037d0| 6a 65 63 74 20 29 3b 0d | 0a 09 53 75 70 65 72 2e |ject );.|..Super.|
|000037e0| 53 75 62 6a 65 63 74 44 | 65 73 74 72 6f 79 65 64 |SubjectD|estroyed|
|000037f0| 28 20 53 75 62 6a 65 63 | 74 20 29 3b 0d 0a 7d 0d |( Subjec|t );..}.|
|00003800| 0a 2a 2f 0d 0a 0d 0a 2f | 2f 2d 2d 2d 2d 2d 2d 2d |.*/..../|/-------|
|00003810| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00003820| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00003830| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00003840| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00003850| 2d 2d 2d 2d 2d 2d 2d 0d | 0a 73 69 6d 75 6c 61 74 |-------.|.simulat|
|00003860| 65 64 20 66 75 6e 63 74 | 69 6f 6e 20 52 65 73 65 |ed funct|ion Rese|
|00003870| 74 47 75 61 72 64 44 61 | 74 61 28 20 69 6e 74 20 |tGuardDa|ta( int |
|00003880| 47 75 61 72 64 49 44 20 | 29 0d 0a 7b 0d 0a 09 2f |GuardID |)..{.../|
|00003890| 2f 2f 2f 44 4d 28 20 53 | 65 6c 66 24 22 3a 3a 52 |///DM( S|elf$"::R|
|000038a0| 65 73 65 74 47 75 61 72 | 64 44 61 74 61 28 29 3a |esetGuar|dData():|
|000038b0| 20 22 24 47 75 61 72 64 | 49 44 20 29 3b 0d 0a 09 | "$Guard|ID );...|
|000038c0| 2f 2f 2f 2f 44 4d 28 20 | 53 65 6c 66 24 22 47 75 |////DM( |Self$"Gu|
|000038d0| 61 72 64 41 63 74 6f 72 | 3a 20 22 24 47 75 61 72 |ardActor|: "$Guar|
|000038e0| 64 44 61 74 61 5b 20 47 | 75 61 72 64 49 44 20 5d |dData[ G|uardID ]|
|000038f0| 2e 47 75 61 72 64 41 63 | 74 6f 72 24 22 47 75 61 |.GuardAc|tor$"Gua|
|00003900| 72 64 50 6f 69 6e 74 3a | 20 22 24 47 75 61 72 64 |rdPoint:| "$Guard|
|00003910| 44 61 74 61 5b 20 47 75 | 61 72 64 49 44 20 5d 2e |Data[ Gu|ardID ].|
|00003920| 47 75 61 72 64 50 6f 69 | 6e 74 24 22 43 6c 61 69 |GuardPoi|nt$"Clai|
|00003930| 6d 65 64 3a 20 22 24 47 | 75 61 72 64 44 61 74 61 |med: "$G|uardData|
|00003940| 5b 20 47 75 61 72 64 49 | 44 20 5d 2e 43 6c 61 69 |[ GuardI|D ].Clai|
|00003950| 6d 65 64 24 22 56 61 6c | 69 64 3a 20 22 24 47 75 |med$"Val|id: "$Gu|
|00003960| 61 72 64 44 61 74 61 5b | 20 47 75 61 72 64 49 44 |ardData[| GuardID|
|00003970| 20 5d 2e 56 61 6c 69 64 | 20 29 3b 0d 0a 0d 0a 09 | ].Valid| );.....|
|00003980| 2f 2f 20 56 61 6c 69 64 | 61 74 65 20 69 6e 70 75 |// Valid|ate inpu|
|00003990| 74 2e 0d 0a 09 69 66 28 | 20 47 75 61 72 64 49 44 |t....if(| GuardID|
|000039a0| 20 3c 20 30 20 7c 7c 20 | 47 75 61 72 64 49 44 20 | < 0 || |GuardID |
|000039b0| 3e 3d 20 41 72 72 61 79 | 43 6f 75 6e 74 28 47 75 |>= Array|Count(Gu|
|000039c0| 61 72 64 44 61 74 61 29 | 20 29 0d 0a 09 7b 0d 0a |ardData)| )...{..|
|000039d0| 09 09 77 61 72 6e 28 20 | 22 47 75 61 72 64 49 44 |..warn( |"GuardID|
|000039e0| 20 6f 75 74 20 6f 66 20 | 72 61 6e 67 65 2e 22 20 | out of |range." |
|000039f0| 29 3b 0d 0a 09 09 72 65 | 74 75 72 6e 3b 0d 0a 09 |);....re|turn;...|
|00003a00| 7d 0d 0a 0d 0a 09 2f 2f | 69 66 28 20 47 75 61 72 |}.....//|if( Guar|
|00003a10| 64 44 61 74 61 5b 69 5d | 2e 47 75 61 72 64 41 63 |dData[i]|.GuardAc|
|00003a20| 74 6f 72 20 21 3d 20 4e | 6f 6e 65 20 29 20 7b 20 |tor != N|one ) { |
|00003a30| 47 75 61 72 64 44 61 74 | 61 5b 69 5d 2e 47 75 61 |GuardDat|a[i].Gua|
|00003a40| 72 64 41 63 74 6f 72 2e | 44 65 74 61 63 68 44 65 |rdActor.|DetachDe|
|00003a50| 73 74 72 6f 79 4f 62 73 | 65 72 76 65 72 28 20 53 |stroyObs|erver( S|
|00003a60| 65 6c 66 20 29 3b 20 7d | 0d 0a 09 47 75 61 72 64 |elf ); }|...Guard|
|00003a70| 44 61 74 61 5b 20 47 75 | 61 72 64 49 44 20 5d 2e |Data[ Gu|ardID ].|
|00003a80| 47 75 61 72 64 41 63 74 | 6f 72 20 3d 20 4e 6f 6e |GuardAct|or = Non|
|00003a90| 65 3b 0d 0a 09 47 75 61 | 72 64 44 61 74 61 5b 20 |e;...Gua|rdData[ |
|00003aa0| 47 75 61 72 64 49 44 20 | 5d 2e 47 75 61 72 64 50 |GuardID |].GuardP|
|00003ab0| 6f 69 6e 74 20 3d 20 76 | 65 63 74 28 30 2c 30 2c |oint = v|ect(0,0,|
|00003ac0| 30 29 3b 0d 0a 09 47 75 | 61 72 64 44 61 74 61 5b |0);...Gu|ardData[|
|00003ad0| 20 47 75 61 72 64 49 44 | 20 5d 2e 43 6c 61 69 6d | GuardID| ].Claim|
|00003ae0| 65 64 20 3d 20 30 3b 0d | 0a 09 47 75 61 72 64 44 |ed = 0;.|..GuardD|
|00003af0| 61 74 61 5b 20 47 75 61 | 72 64 49 44 20 5d 2e 56 |ata[ Gua|rdID ].V|
|00003b00| 61 6c 69 64 20 3d 20 30 | 3b 0d 0a 7d 0d 0a 0d 0a |alid = 0|;..}....|
|00003b10| 2f 2f 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |//------|--------|
|00003b20| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00003b30| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00003b40| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00003b50| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00003b60| 0d 0a 2f 2f 20 55 73 65 | 20 74 6f 20 67 65 74 20 |..// Use| to get |
|00003b70| 74 68 65 20 67 75 61 72 | 64 20 61 63 74 6f 72 20 |the guar|d actor |
|00003b80| 6f 72 20 70 6f 69 6e 74 | 20 69 6e 64 69 63 61 74 |or point| indicat|
|00003b90| 65 64 20 62 79 20 74 68 | 65 20 67 69 76 65 6e 20 |ed by th|e given |
|00003ba0| 47 75 61 72 64 49 44 2e | 0d 0a 2f 2f 20 47 75 61 |GuardID.|..// Gua|
|00003bb0| 72 64 50 6f 69 6e 74 20 | 69 73 20 6f 6e 6c 79 20 |rdPoint |is only |
|00003bc0| 76 61 6c 69 64 20 69 66 | 20 47 75 61 72 64 41 63 |valid if| GuardAc|
|00003bd0| 74 6f 72 20 69 73 20 4e | 6f 6e 65 2e 0d 0a 2f 2f |tor is N|one...//|
|00003be0| 20 49 66 20 74 68 65 20 | 66 75 6e 63 74 69 6f 6e | If the |function|
|00003bf0| 20 72 65 74 75 72 6e 73 | 20 66 61 6c 73 65 2c 20 | returns| false, |
|00003c00| 47 75 61 72 64 41 63 74 | 6f 72 2c 20 47 75 61 72 |GuardAct|or, Guar|
|00003c10| 64 50 6f 69 6e 74 20 61 | 6e 64 20 62 43 6c 61 69 |dPoint a|nd bClai|
|00003c20| 6d 65 64 20 0d 0a 2f 2f | 20 61 72 65 20 6e 6f 74 |med ..//| are not|
|00003c30| 20 76 61 6c 69 64 2e 0d | 0a 2f 2f 2d 2d 2d 2d 2d | valid..|.//-----|
|00003c40| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00003c50| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00003c60| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00003c70| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00003c80| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 0d 0a 73 69 6d 75 6c |--------|-..simul|
|00003c90| 61 74 65 64 20 66 75 6e | 63 74 69 6f 6e 20 62 6f |ated fun|ction bo|
|00003ca0| 6f 6c 20 47 65 74 47 75 | 61 72 64 44 61 74 61 0d |ol GetGu|ardData.|
|00003cb0| 0a 28 09 69 6e 74 09 09 | 09 47 75 61 72 64 49 44 |.(.int..|.GuardID|
|00003cc0| 2c 20 0d 0a 09 6f 75 74 | 20 41 63 74 6f 72 09 47 |, ...out| Actor.G|
|00003cd0| 75 61 72 64 41 63 74 6f | 72 2c 20 0d 0a 09 6f 75 |uardActo|r, ...ou|
|00003ce0| 74 20 76 65 63 74 6f 72 | 09 47 75 61 72 64 50 6f |t vector|.GuardPo|
|00003cf0| 69 6e 74 2c 0d 0a 09 6f | 75 74 20 62 79 74 65 09 |int,...o|ut byte.|
|00003d00| 43 6c 61 69 6d 65 64 09 | 2f 2f 20 28 31 3d 74 72 |Claimed.|// (1=tr|
|00003d10| 75 65 2c 30 3d 66 61 6c | 73 65 29 0d 0a 29 0d 0a |ue,0=fal|se)..)..|
|00003d20| 7b 0d 0a 09 2f 2f 20 56 | 61 6c 69 64 61 74 65 20 |{...// V|alidate |
|00003d30| 69 6e 70 75 74 2e 0d 0a | 09 69 66 28 20 47 75 61 |input...|.if( Gua|
|00003d40| 72 64 49 44 20 3c 20 30 | 20 7c 7c 20 47 75 61 72 |rdID < 0| || Guar|
|00003d50| 64 49 44 20 3e 3d 20 41 | 72 72 61 79 43 6f 75 6e |dID >= A|rrayCoun|
|00003d60| 74 28 47 75 61 72 64 44 | 61 74 61 29 20 29 0d 0a |t(GuardD|ata) )..|
|00003d70| 09 7b 0d 0a 09 09 77 61 | 72 6e 28 20 22 47 75 61 |.{....wa|rn( "Gua|
|00003d80| 72 64 49 44 20 6f 75 74 | 20 6f 66 20 72 61 6e 67 |rdID out| of rang|
|00003d90| 65 2e 22 20 29 3b 0d 0a | 09 09 72 65 74 75 72 6e |e." );..|..return|
|00003da0| 20 66 61 6c 73 65 3b 0d | 0a 09 7d 0d 0a 0d 0a 09 | false;.|..}.....|
|00003db0| 47 75 61 72 64 41 63 74 | 6f 72 20 3d 20 47 75 61 |GuardAct|or = Gua|
|00003dc0| 72 64 44 61 74 61 5b 20 | 47 75 61 72 64 49 44 20 |rdData[ |GuardID |
|00003dd0| 5d 2e 47 75 61 72 64 41 | 63 74 6f 72 3b 0d 0a 09 |].GuardA|ctor;...|
|00003de0| 47 75 61 72 64 50 6f 69 | 6e 74 20 3d 20 47 75 61 |GuardPoi|nt = Gua|
|00003df0| 72 64 44 61 74 61 5b 20 | 47 75 61 72 64 49 44 20 |rdData[ |GuardID |
|00003e00| 5d 2e 47 75 61 72 64 50 | 6f 69 6e 74 3b 0d 0a 09 |].GuardP|oint;...|
|00003e10| 43 6c 61 69 6d 65 64 20 | 20 20 20 3d 20 47 75 61 |Claimed | = Gua|
|00003e20| 72 64 44 61 74 61 5b 20 | 47 75 61 72 64 49 44 20 |rdData[ |GuardID |
|00003e30| 5d 2e 43 6c 61 69 6d 65 | 64 3b 0d 0a 09 72 65 74 |].Claime|d;...ret|
|00003e40| 75 72 6e 20 20 20 20 20 | 20 20 47 75 61 72 64 44 |urn | GuardD|
|00003e50| 61 74 61 5b 20 47 75 61 | 72 64 49 44 20 5d 2e 56 |ata[ Gua|rdID ].V|
|00003e60| 61 6c 69 64 3d 3d 31 3b | 0d 0a 7d 0d 0a 0d 0a 2f |alid==1;|..}..../|
|00003e70| 2f 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |/-------|--------|
|00003e80| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00003e90| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00003ea0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00003eb0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 0d |--------|-------.|
|00003ec0| 0a 2f 2f 20 55 73 65 20 | 74 68 69 73 20 66 75 6e |.// Use |this fun|
|00003ed0| 63 74 69 6f 6e 20 74 6f | 20 64 65 74 65 72 6d 69 |ction to| determi|
|00003ee0| 6e 65 20 77 68 65 74 68 | 65 72 20 6f 72 20 6e 6f |ne wheth|er or no|
|00003ef0| 74 20 74 68 65 20 61 63 | 74 6f 72 20 69 6e 20 71 |t the ac|tor in q|
|00003f00| 75 65 73 74 69 6f 6e 20 | 69 73 0d 0a 2f 2f 20 69 |uestion |is..// i|
|00003f10| 6e 20 61 20 70 6f 73 69 | 74 69 6f 6e 20 66 6f 72 |n a posi|tion for|
|00003f20| 20 75 73 20 74 6f 20 61 | 74 74 61 63 6b 20 28 72 | us to a|ttack (r|
|00003f30| 65 6c 61 74 69 76 65 20 | 74 6f 20 6f 75 72 20 67 |elative |to our g|
|00003f40| 75 61 72 64 20 70 6f 69 | 6e 74 73 29 2e 0d 0a 2f |uard poi|nts).../|
|00003f50| 2f 0d 0a 2f 2f 20 52 65 | 74 75 72 6e 73 20 69 6e |/..// Re|turns in|
|00003f60| 64 65 78 20 6f 66 20 63 | 6c 61 69 6d 65 64 20 47 |dex of c|laimed G|
|00003f70| 75 61 72 64 20 70 6f 69 | 6e 74 2f 61 63 74 6f 72 |uard poi|nt/actor|
|00003f80| 2e 0d 0a 2f 2f 20 52 65 | 74 75 72 6e 73 20 63 6c |...// Re|turns cl|
|00003f90| 61 73 73 27 4d 61 73 68 | 61 64 61 72 47 75 69 64 |ass'Mash|adarGuid|
|00003fa0| 65 27 2e 64 65 66 61 75 | 6c 74 2e 47 75 61 72 64 |e'.defau|lt.Guard|
|00003fb0| 49 44 20 28 2d 31 29 20 | 69 66 20 6e 6f 20 76 61 |ID (-1) |if no va|
|00003fc0| 6c 69 64 20 0d 0a 2f 2f | 20 47 75 61 72 64 20 70 |lid ..//| Guard p|
|00003fd0| 6f 69 6e 74 2f 61 63 74 | 6f 72 20 69 73 20 66 6f |oint/act|or is fo|
|00003fe0| 75 6e 64 2e 0d 0a 2f 2f | 2d 2d 2d 2d 2d 2d 2d 2d |und...//|--------|
|00003ff0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00004000| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00004010| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00004020| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00004030| 2d 2d 2d 2d 2d 2d 0d 0a | 73 69 6d 75 6c 61 74 65 |------..|simulate|
|00004040| 64 20 66 75 6e 63 74 69 | 6f 6e 20 69 6e 74 20 43 |d functi|on int C|
|00004050| 6c 61 69 6d 47 75 61 72 | 64 28 20 41 63 74 6f 72 |laimGuar|d( Actor|
|00004060| 20 4f 74 68 65 72 2c 20 | 6f 70 74 69 6f 6e 61 6c | Other, |optional|
|00004070| 20 66 6c 6f 61 74 20 52 | 61 64 69 75 73 20 29 0d | float R|adius ).|
|00004080| 0a 7b 0d 0a 09 6c 6f 63 | 61 6c 20 69 6e 74 20 69 |.{...loc|al int i|
|00004090| 3b 0d 0a 09 6c 6f 63 61 | 6c 20 76 65 63 74 6f 72 |;...loca|l vector|
|000040a0| 20 4c 6f 63 3b 0d 0a 0d | 0a 09 2f 2f 20 44 65 66 | Loc;...|..// Def|
|000040b0| 61 75 6c 74 20 74 6f 20 | 47 75 61 72 64 52 61 64 |ault to |GuardRad|
|000040c0| 69 75 73 2e 0d 0a 09 69 | 66 28 20 52 61 64 69 75 |ius....i|f( Radiu|
|000040d0| 73 20 3d 3d 20 30 2e 30 | 20 29 0d 0a 09 7b 0d 0a |s == 0.0| )...{..|
|000040e0| 09 09 52 61 64 69 75 73 | 20 3d 20 47 75 61 72 64 |..Radius| = Guard|
|000040f0| 52 61 64 69 75 73 3b 0d | 0a 09 7d 0d 0a 0d 0a 09 |Radius;.|..}.....|
|00004100| 2f 2f 20 53 65 65 20 69 | 66 20 4f 74 68 65 72 20 |// See i|f Other |
|00004110| 69 73 20 77 69 74 68 69 | 6e 20 52 61 64 69 75 73 |is withi|n Radius|
|00004120| 20 75 6e 69 74 73 20 6f | 66 20 61 6e 79 20 6f 66 | units o|f any of|
|00004130| 20 6f 75 72 20 67 75 61 | 72 64 20 70 6f 69 6e 74 | our gua|rd point|
|00004140| 73 20 6f 72 20 61 63 74 | 6f 72 73 2e 0d 0a 09 66 |s or act|ors....f|
|00004150| 6f 72 28 20 69 20 3d 20 | 30 3b 20 69 20 3c 20 41 |or( i = |0; i < A|
|00004160| 72 72 61 79 43 6f 75 6e | 74 28 47 75 61 72 64 44 |rrayCoun|t(GuardD|
|00004170| 61 74 61 29 3b 20 69 2b | 2b 20 29 0d 0a 09 7b 0d |ata); i+|+ )...{.|
|00004180| 0a 09 09 69 66 28 20 47 | 75 61 72 64 44 61 74 61 |...if( G|uardData|
|00004190| 5b 69 5d 2e 56 61 6c 69 | 64 20 3d 3d 20 31 20 26 |[i].Vali|d == 1 &|
|000041a0| 26 20 47 75 61 72 64 44 | 61 74 61 5b 69 5d 2e 43 |& GuardD|ata[i].C|
|000041b0| 6c 61 69 6d 65 64 20 3d | 3d 20 30 20 29 0d 0a 09 |laimed =|= 0 )...|
|000041c0| 09 7b 0d 0a 09 09 09 69 | 66 28 20 47 75 61 72 64 |.{.....i|f( Guard|
|000041d0| 44 61 74 61 5b 69 5d 2e | 47 75 61 72 64 41 63 74 |Data[i].|GuardAct|
|000041e0| 6f 72 20 21 3d 20 4e 6f | 6e 65 20 29 0d 0a 09 09 |or != No|ne )....|
|000041f0| 09 7b 0d 0a 09 09 09 09 | 4c 6f 63 20 3d 20 47 65 |.{......|Loc = Ge|
|00004200| 74 41 63 74 6f 72 4c 6f | 63 61 74 69 6f 6e 28 20 |tActorLo|cation( |
|00004210| 47 75 61 72 64 44 61 74 | 61 5b 69 5d 2e 47 75 61 |GuardDat|a[i].Gua|
|00004220| 72 64 41 63 74 6f 72 20 | 29 3b 0d 0a 09 09 09 7d |rdActor |);.....}|
|00004230| 0d 0a 09 09 09 65 6c 73 | 65 0d 0a 09 09 09 7b 0d |.....els|e.....{.|
|00004240| 0a 09 09 09 09 4c 6f 63 | 20 3d 20 47 75 61 72 64 |.....Loc| = Guard|
|00004250| 44 61 74 61 5b 69 5d 2e | 47 75 61 72 64 50 6f 69 |Data[i].|GuardPoi|
|00004260| 6e 74 3b 0d 0a 09 09 09 | 7d 0d 0a 0d 0a 09 09 09 |nt;.....|}.......|
|00004270| 69 66 28 20 56 53 69 7a | 65 28 20 4f 74 68 65 72 |if( VSiz|e( Other|
|00004280| 2e 4c 6f 63 61 74 69 6f | 6e 20 2d 20 4c 6f 63 20 |.Locatio|n - Loc |
|00004290| 29 20 3c 3d 20 52 61 64 | 69 75 73 20 29 0d 0a 09 |) <= Rad|ius )...|
|000042a0| 09 09 7b 0d 0a 09 09 09 | 09 47 75 61 72 64 44 61 |..{.....|.GuardDa|
|000042b0| 74 61 5b 69 5d 2e 43 6c | 61 69 6d 65 64 20 3d 20 |ta[i].Cl|aimed = |
|000042c0| 31 3b 0d 0a 09 09 09 09 | 72 65 74 75 72 6e 20 69 |1;......|return i|
|000042d0| 3b 0d 0a 09 09 09 7d 0d | 0a 09 09 7d 0d 0a 09 7d |;.....}.|...}...}|
|000042e0| 0d 0a 0d 0a 09 72 65 74 | 75 72 6e 20 63 6c 61 73 |.....ret|urn clas|
|000042f0| 73 27 4d 61 73 68 61 64 | 61 72 47 75 69 64 65 27 |s'Mashad|arGuide'|
|00004300| 2e 64 65 66 61 75 6c 74 | 2e 47 75 61 72 64 49 44 |.default|.GuardID|
|00004310| 3b 0d 0a 7d 0d 0a 0d 0a | 2f 2f 2d 2d 2d 2d 2d 2d |;..}....|//------|
|00004320| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00004330| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00004340| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00004350| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00004360| 2d 2d 2d 2d 2d 2d 2d 2d | 0d 0a 73 69 6d 75 6c 61 |--------|..simula|
|00004370| 74 65 64 20 73 74 61 74 | 69 63 20 66 75 6e 63 74 |ted stat|ic funct|
|00004380| 69 6f 6e 20 76 65 63 74 | 6f 72 20 47 65 74 41 63 |ion vect|or GetAc|
|00004390| 74 6f 72 4c 6f 63 61 74 | 69 6f 6e 28 20 41 63 74 |torLocat|ion( Act|
|000043a0| 6f 72 20 4f 74 68 65 72 | 20 29 0d 0a 7b 0d 0a 09 |or Other| )..{...|
|000043b0| 6c 6f 63 61 6c 20 76 65 | 63 74 6f 72 20 4c 6f 63 |local ve|ctor Loc|
|000043c0| 3b 0d 0a 0d 0a 09 69 66 | 28 20 4f 74 68 65 72 20 |;.....if|( Other |
|000043d0| 21 3d 20 4e 6f 6e 65 20 | 29 0d 0a 09 7b 0d 0a 09 |!= None |)...{...|
|000043e0| 09 4c 6f 63 20 3d 20 4f | 74 68 65 72 2e 4c 6f 63 |.Loc = O|ther.Loc|
|000043f0| 61 74 69 6f 6e 3b 0d 0a | 0d 0a 09 09 2f 2f 20 49 |ation;..|....// I|
|00004400| 66 20 73 6f 6d 65 6f 6e | 65 20 69 73 20 63 61 72 |f someon|e is car|
|00004410| 72 79 69 6e 67 20 74 68 | 69 73 20 69 74 65 6d 2c |rying th|is item,|
|00004420| 20 75 73 65 20 74 68 65 | 20 6c 6f 63 61 74 69 6f | use the| locatio|
|00004430| 6e 20 6f 66 20 74 68 61 | 74 20 70 65 72 73 6f 6e |n of tha|t person|
|00004440| 20 69 6e 73 74 65 61 64 | 2e 0d 0a 09 09 69 66 28 | instead|.....if(|
|00004450| 20 49 6e 76 65 6e 74 6f | 72 79 28 4f 74 68 65 72 | Invento|ry(Other|
|00004460| 29 20 21 3d 20 4e 6f 6e | 65 20 26 26 20 49 6e 76 |) != Non|e && Inv|
|00004470| 65 6e 74 6f 72 79 28 4f | 74 68 65 72 29 2e 4f 77 |entory(O|ther).Ow|
|00004480| 6e 65 72 20 21 3d 20 4e | 6f 6e 65 20 29 0d 0a 09 |ner != N|one )...|
|00004490| 09 7b 0d 0a 09 09 09 4c | 6f 63 20 3d 20 4f 74 68 |.{.....L|oc = Oth|
|000044a0| 65 72 2e 4f 77 6e 65 72 | 2e 4c 6f 63 61 74 69 6f |er.Owner|.Locatio|
|000044b0| 6e 3b 0d 0a 09 09 7d 0d | 0a 09 7d 0d 0a 0d 0a 09 |n;....}.|..}.....|
|000044c0| 72 65 74 75 72 6e 20 4c | 6f 63 3b 0d 0a 7d 0d 0a |return L|oc;..}..|
|000044d0| 0d 0a 2f 2f 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |..//----|--------|
|000044e0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000044f0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00004500| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00004510| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00004520| 2d 2d 0d 0a 2f 2f 20 59 | 6f 75 20 6d 75 73 74 20 |--..// Y|ou must |
|00004530| 72 65 6c 65 61 73 65 20 | 61 6e 79 20 63 6c 61 69 |release |any clai|
|00004540| 6d 73 20 6d 61 64 65 20 | 77 69 74 68 20 43 6c 61 |ms made |with Cla|
|00004550| 69 6d 47 75 61 72 64 20 | 75 73 69 6e 67 20 74 68 |imGuard |using th|
|00004560| 69 73 20 66 75 6e 63 74 | 69 6f 6e 20 77 68 65 6e |is funct|ion when|
|00004570| 0d 0a 2f 2f 20 79 6f 75 | 20 61 72 65 20 64 6f 6e |..// you| are don|
|00004580| 65 20 61 74 74 61 63 6b | 69 6e 67 2e 0d 0a 2f 2f |e attack|ing...//|
|00004590| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000045a0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000045b0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000045c0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000045d0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 0d 0a |--------|------..|
|000045e0| 73 69 6d 75 6c 61 74 65 | 64 20 66 75 6e 63 74 69 |simulate|d functi|
|000045f0| 6f 6e 20 52 65 6c 65 61 | 73 65 43 6c 61 69 6d 28 |on Relea|seClaim(|
|00004600| 20 69 6e 74 20 43 6c 61 | 69 6d 4e 75 6d 62 65 72 | int Cla|imNumber|
|00004610| 20 29 0d 0a 7b 0d 0a 09 | 2f 2f 2f 2f 44 4d 28 20 | )..{...|////DM( |
|00004620| 53 65 6c 66 24 22 3a 3a | 52 65 6c 65 61 73 65 43 |Self$"::|ReleaseC|
|00004630| 6c 61 69 6d 28 29 3a 20 | 22 24 43 6c 61 69 6d 4e |laim(): |"$ClaimN|
|00004640| 75 6d 62 65 72 20 29 3b | 0d 0a 0d 0a 09 69 66 28 |umber );|.....if(|
|00004650| 20 43 6c 61 69 6d 4e 75 | 6d 62 65 72 20 3d 3d 20 | ClaimNu|mber == |
|00004660| 63 6c 61 73 73 27 4d 61 | 73 68 61 64 61 72 47 75 |class'Ma|shadarGu|
|00004670| 69 64 65 27 2e 64 65 66 | 61 75 6c 74 2e 47 75 61 |ide'.def|ault.Gua|
|00004680| 72 64 53 65 61 6c 49 44 | 20 29 0d 0a 09 7b 0d 0a |rdSealID| )...{..|
|00004690| 09 09 49 6e 63 72 65 6d | 65 6e 74 53 65 61 6c 47 |..Increm|entSealG|
|000046a0| 75 61 72 64 43 6f 75 6e | 74 28 29 3b 0d 0a 09 7d |uardCoun|t();...}|
|000046b0| 0d 0a 09 65 6c 73 65 20 | 69 66 28 20 43 6c 61 69 |...else |if( Clai|
|000046c0| 6d 4e 75 6d 62 65 72 20 | 3e 3d 20 30 20 26 26 20 |mNumber |>= 0 && |
|000046d0| 43 6c 61 69 6d 4e 75 6d | 62 65 72 20 3c 20 41 72 |ClaimNum|ber < Ar|
|000046e0| 72 61 79 43 6f 75 6e 74 | 28 47 75 61 72 64 44 61 |rayCount|(GuardDa|
|000046f0| 74 61 29 20 29 0d 0a 09 | 7b 0d 0a 09 09 47 75 61 |ta) )...|{....Gua|
|00004700| 72 64 44 61 74 61 5b 20 | 43 6c 61 69 6d 4e 75 6d |rdData[ |ClaimNum|
|00004710| 62 65 72 20 5d 2e 43 6c | 61 69 6d 65 64 20 3d 20 |ber ].Cl|aimed = |
|00004720| 30 3b 0d 0a 09 7d 0d 0a | 09 65 6c 73 65 0d 0a 09 |0;...}..|.else...|
|00004730| 7b 0d 0a 09 09 77 61 72 | 6e 28 20 22 49 6e 76 61 |{....war|n( "Inva|
|00004740| 6c 69 64 20 43 6c 61 69 | 6d 4e 75 6d 62 65 72 2e |lid Clai|mNumber.|
|00004750| 22 20 29 3b 0d 0a 09 7d | 0d 0a 0d 0a 09 2f 2f 52 |" );...}|.....//R|
|00004760| 65 65 76 61 6c 75 61 74 | 65 47 75 61 72 64 41 63 |eevaluat|eGuardAc|
|00004770| 74 6f 72 73 28 29 3b 0d | 0a 7d 0d 0a 0d 0a 2f 2a |tors();.|.}..../*|
|00004780| 20 4f 42 45 0d 0a 2f 2f | 2d 2d 2d 2d 2d 2d 2d 2d | OBE..//|--------|
|00004790| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000047a0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000047b0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000047c0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000047d0| 2d 2d 2d 2d 2d 2d 0d 0a | 2f 2f 20 4d 61 6b 65 20 |------..|// Make |
|000047e0| 73 75 72 65 20 61 6c 6c | 20 6f 75 72 20 47 75 61 |sure all| our Gua|
|000047f0| 72 64 41 63 74 6f 72 73 | 20 61 72 65 20 73 74 69 |rdActors| are sti|
|00004800| 6c 6c 20 76 61 6c 69 64 | 2e 0d 0a 2f 2f 2d 2d 2d |ll valid|...//---|
|00004810| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00004820| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00004830| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00004840| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00004850| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 0d 0a 73 69 6d |--------|---..sim|
|00004860| 75 6c 61 74 65 64 20 66 | 75 6e 63 74 69 6f 6e 20 |ulated f|unction |
|00004870| 52 65 65 76 61 6c 75 61 | 74 65 47 75 61 72 64 41 |Reevalua|teGuardA|
|00004880| 63 74 6f 72 73 28 29 0d | 0a 7b 0d 0a 09 6c 6f 63 |ctors().|.{...loc|
|00004890| 61 6c 20 69 6e 74 20 69 | 3b 0d 0a 09 0d 0a 09 66 |al int i|;......f|
|000048a0| 6f 72 28 20 69 20 3d 20 | 30 3b 20 69 20 3c 20 41 |or( i = |0; i < A|
|000048b0| 72 72 61 79 43 6f 75 6e | 74 28 47 75 61 72 64 44 |rrayCoun|t(GuardD|
|000048c0| 61 74 61 29 3b 20 69 2b | 2b 20 29 0d 0a 09 7b 0d |ata); i+|+ )...{.|
|000048d0| 0a 09 09 2f 2f 20 44 65 | 73 74 72 6f 79 4f 62 73 |...// De|stroyObs|
|000048e0| 65 72 76 65 72 73 20 75 | 73 61 67 65 20 70 72 65 |ervers u|sage pre|
|000048f0| 76 65 6e 74 73 20 75 73 | 20 66 72 6f 6d 20 68 61 |vents us| from ha|
|00004900| 76 69 6e 67 20 61 20 76 | 61 6c 69 64 20 47 75 61 |ving a v|alid Gua|
|00004910| 72 64 44 61 74 61 0d 0a | 09 09 2f 2f 20 77 69 74 |rdData..|..// wit|
|00004920| 68 20 62 6f 74 68 20 61 | 6e 20 69 6e 76 61 6c 69 |h both a|n invali|
|00004930| 64 20 47 75 61 72 64 41 | 63 74 6f 72 20 61 6e 64 |d GuardA|ctor and|
|00004940| 20 47 75 61 72 64 50 6f | 69 6e 74 2e 0d 0a 09 09 | GuardPo|int.....|
|00004950| 2f 2f 20 28 49 4f 57 3a | 20 49 66 20 47 75 61 72 |// (IOW:| If Guar|
|00004960| 64 44 61 74 61 5b 69 5d | 2e 56 61 6c 69 64 20 3d |dData[i]|.Valid =|
|00004970| 3d 20 31 20 26 26 20 47 | 75 61 72 64 44 61 74 61 |= 1 && G|uardData|
|00004980| 5b 69 5d 2e 47 75 61 72 | 64 41 63 74 6f 72 20 3d |[i].Guar|dActor =|
|00004990| 3d 20 4e 6f 6e 65 2c 0d | 0a 09 09 2f 2f 20 74 68 |= None,.|...// th|
|000049a0| 65 6e 20 74 68 69 73 20 | 47 75 61 72 64 44 61 74 |en this |GuardDat|
|000049b0| 61 20 6d 75 73 74 20 68 | 61 76 65 20 62 65 65 6e |a must h|ave been|
|000049c0| 20 76 61 6c 69 64 61 74 | 65 64 20 76 69 61 20 41 | validat|ed via A|
|000049d0| 64 64 47 75 61 72 64 50 | 6f 69 6e 74 2e 0d 0a 09 |ddGuardP|oint....|
|000049e0| 09 69 66 28 20 47 75 61 | 72 64 44 61 74 61 5b 69 |.if( Gua|rdData[i|
|000049f0| 5d 2e 56 61 6c 69 64 20 | 3d 3d 20 31 20 26 26 20 |].Valid |== 1 && |
|00004a00| 47 75 61 72 64 44 61 74 | 61 5b 69 5d 2e 47 75 61 |GuardDat|a[i].Gua|
|00004a10| 72 64 41 63 74 6f 72 20 | 21 3d 20 4e 6f 6e 65 20 |rdActor |!= None |
|00004a20| 29 0d 0a 09 09 7b 0d 0a | 09 09 09 69 66 28 20 50 |)....{..|...if( P|
|00004a30| 61 77 6e 28 47 75 61 72 | 64 44 61 74 61 5b 69 5d |awn(Guar|dData[i]|
|00004a40| 2e 47 75 61 72 64 41 63 | 74 6f 72 29 20 21 3d 20 |.GuardAc|tor) != |
|00004a50| 4e 6f 6e 65 20 26 26 20 | 50 61 77 6e 28 47 75 61 |None && |Pawn(Gua|
|00004a60| 72 64 44 61 74 61 5b 69 | 5d 2e 47 75 61 72 64 41 |rdData[i|].GuardA|
|00004a70| 63 74 6f 72 29 2e 48 65 | 61 6c 74 68 20 3c 3d 20 |ctor).He|alth <= |
|00004a80| 30 20 29 0d 0a 09 09 09 | 7b 0d 0a 09 09 09 09 52 |0 ).....|{......R|
|00004a90| 65 73 65 74 47 75 61 72 | 64 44 61 74 61 28 20 69 |esetGuar|dData( i|
|00004aa0| 20 29 3b 0d 0a 09 09 09 | 7d 0d 0a 09 09 09 65 6c | );.....|}.....el|
|00004ab0| 73 65 20 69 66 28 20 53 | 65 61 6c 28 47 75 61 72 |se if( S|eal(Guar|
|00004ac0| 64 44 61 74 61 5b 69 5d | 2e 47 75 61 72 64 41 63 |dData[i]|.GuardAc|
|00004ad0| 74 6f 72 29 20 21 3d 20 | 4e 6f 6e 65 20 26 26 20 |tor) != |None && |
|00004ae0| 53 65 61 6c 28 47 75 61 | 72 64 44 61 74 61 5b 69 |Seal(Gua|rdData[i|
|00004af0| 5d 2e 47 75 61 72 64 41 | 63 74 6f 72 29 2e 4f 77 |].GuardA|ctor).Ow|
|00004b00| 6e 65 72 20 21 3d 20 4e | 6f 6e 65 20 29 0d 0a 09 |ner != N|one )...|
|00004b10| 09 09 7b 0d 0a 09 09 09 | 09 2f 2f 20 49 66 20 74 |..{.....|.// If t|
|00004b20| 68 65 20 73 65 61 6c 20 | 69 73 20 6e 6f 74 20 72 |he seal |is not r|
|00004b30| 65 61 63 68 61 62 6c 65 | 20 62 79 20 61 6e 79 20 |eachable| by any |
|00004b40| 74 65 6e 64 72 69 6c 73 | 2c 20 74 68 65 6e 20 77 |tendrils|, then w|
|00004b50| 65 20 6e 65 65 64 20 74 | 6f 20 72 65 70 6c 61 63 |e need t|o replac|
|00004b60| 65 20 69 74 20 77 69 74 | 68 20 6f 6e 65 20 74 68 |e it wit|h one th|
|00004b70| 61 74 20 69 73 2e 0d 0a | 09 09 09 7d 0d 0a 09 09 |at is...|...}....|
|00004b80| 7d 0d 0a 09 7d 0d 0a 7d | 0d 0a 2a 2f 0d 0a 0d 0a |}...}..}|..*/....|
|00004b90| 2f 2f 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |//------|--------|
|00004ba0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00004bb0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00004bc0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00004bd0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00004be0| 0d 0a 2f 2f 20 4f 6e 6c | 79 20 72 65 74 75 72 6e |..// Onl|y return|
|00004bf0| 20 74 72 75 65 20 69 66 | 20 77 65 20 77 61 6e 74 | true if| we want|
|00004c00| 20 74 68 65 20 74 65 6e | 64 72 69 6c 20 74 6f 20 | the ten|dril to |
|00004c10| 73 74 6f 70 20 67 75 61 | 72 64 69 6e 67 20 77 68 |stop gua|rding wh|
|00004c20| 61 74 65 76 65 72 20 69 | 74 20 69 73 20 0d 0a 2f |atever i|t is ../|
|00004c30| 2f 20 63 75 72 72 65 6e | 74 6c 79 20 67 75 61 72 |/ curren|tly guar|
|00004c40| 64 69 6e 67 2e 0d 0a 2f | 2f 2d 2d 2d 2d 2d 2d 2d |ding.../|/-------|
|00004c50| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00004c60| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00004c70| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00004c80| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00004c90| 2d 2d 2d 2d 2d 2d 2d 0d | 0a 73 69 6d 75 6c 61 74 |-------.|.simulat|
|00004ca0| 65 64 20 66 75 6e 63 74 | 69 6f 6e 20 62 6f 6f 6c |ed funct|ion bool|
|00004cb0| 20 53 68 6f 75 6c 64 53 | 74 6f 70 47 75 61 72 64 | ShouldS|topGuard|
|00004cc0| 69 6e 67 28 20 4d 61 73 | 68 61 64 61 72 47 75 69 |ing( Mas|hadarGui|
|00004cd0| 64 65 20 4d 61 73 68 20 | 29 0d 0a 7b 0d 0a 09 6c |de Mash |)..{...l|
|00004ce0| 6f 63 61 6c 20 62 6f 6f | 6c 20 62 53 74 6f 70 47 |ocal boo|l bStopG|
|00004cf0| 75 61 72 64 69 6e 67 3b | 0d 0a 09 6c 6f 63 61 6c |uarding;|...local|
|00004d00| 20 69 6e 74 20 47 75 61 | 72 64 49 44 3b 0d 0a 0d | int Gua|rdID;...|
|00004d10| 0a 09 2f 2f 20 43 68 65 | 63 6b 20 69 66 20 74 68 |..// Che|ck if th|
|00004d20| 65 20 74 68 69 6e 67 20 | 69 74 20 69 73 20 63 68 |e thing |it is ch|
|00004d30| 61 73 69 6e 67 20 69 73 | 20 73 74 69 6c 6c 20 61 |asing is| still a|
|00004d40| 20 74 68 72 65 61 74 20 | 74 6f 20 74 68 65 20 74 | threat |to the t|
|00004d50| 68 69 6e 67 20 69 74 20 | 69 73 20 67 75 61 72 64 |hing it |is guard|
|00004d60| 69 6e 67 2e 0d 0a 09 69 | 66 28 20 4d 61 73 68 2e |ing....i|f( Mash.|
|00004d70| 44 65 73 74 69 6e 61 74 | 69 6f 6e 20 21 3d 20 4e |Destinat|ion != N|
|00004d80| 6f 6e 65 20 26 26 20 4d | 61 73 68 2e 47 75 61 72 |one && M|ash.Guar|
|00004d90| 64 49 44 20 21 3d 20 63 | 6c 61 73 73 27 4d 61 73 |dID != c|lass'Mas|
|00004da0| 68 61 64 61 72 47 75 69 | 64 65 27 2e 64 65 66 61 |hadarGui|de'.defa|
|00004db0| 75 6c 74 2e 47 75 61 72 | 64 49 44 20 29 0d 0a 09 |ult.Guar|dID )...|
|00004dc0| 7b 0d 0a 09 09 69 66 28 | 20 4d 61 73 68 2e 47 75 |{....if(| Mash.Gu|
|00004dd0| 61 72 64 49 44 20 3d 3d | 20 63 6c 61 73 73 27 4d |ardID ==| class'M|
|00004de0| 61 73 68 61 64 61 72 47 | 75 69 64 65 27 2e 64 65 |ashadarG|uide'.de|
|00004df0| 66 61 75 6c 74 2e 47 75 | 61 72 64 53 65 61 6c 49 |fault.Gu|ardSealI|
|00004e00| 44 20 29 09 2f 2f 20 47 | 75 61 72 64 69 6e 67 20 |D ).// G|uarding |
|00004e10| 73 65 61 6c 2e 0d 0a 09 | 09 7b 0d 0a 09 09 09 62 |seal....|.{.....b|
|00004e20| 53 74 6f 70 47 75 61 72 | 64 69 6e 67 20 3d 20 21 |StopGuar|ding = !|
|00004e30| 49 73 43 6c 6f 73 65 54 | 6f 53 65 61 6c 28 20 4d |IsCloseT|oSeal( M|
|00004e40| 61 73 68 2e 44 65 73 74 | 69 6e 61 74 69 6f 6e 2e |ash.Dest|ination.|
|00004e50| 4c 6f 63 61 74 69 6f 6e | 20 29 3b 0d 0a 09 09 7d |Location| );....}|
|00004e60| 0d 0a 09 09 65 6c 73 65 | 09 09 09 09 09 09 09 09 |....else|........|
|00004e70| 09 09 09 09 09 09 09 2f | 2f 20 47 75 61 72 64 69 |......./|/ Guardi|
|00004e80| 6e 67 20 6c 6f 63 61 74 | 69 6f 6e 20 6f 72 20 61 |ng locat|ion or a|
|00004e90| 63 74 6f 72 2e 0d 0a 09 | 09 7b 0d 0a 09 09 09 52 |ctor....|.{.....R|
|00004ea0| 65 6c 65 61 73 65 43 6c | 61 69 6d 28 20 4d 61 73 |eleaseCl|aim( Mas|
|00004eb0| 68 2e 47 75 61 72 64 49 | 44 20 29 3b 0d 0a 09 09 |h.GuardI|D );....|
|00004ec0| 09 47 75 61 72 64 49 44 | 20 3d 20 43 6c 61 69 6d |.GuardID| = Claim|
|00004ed0| 47 75 61 72 64 28 20 4d | 61 73 68 2e 44 65 73 74 |Guard( M|ash.Dest|
|00004ee0| 69 6e 61 74 69 6f 6e 20 | 29 3b 0d 0a 0d 0a 09 09 |ination |);......|
|00004ef0| 09 2f 2f 44 4d 28 20 22 | 4d 61 73 68 2e 47 75 61 |.//DM( "|Mash.Gua|
|00004f00| 72 64 49 44 20 3d 20 22 | 24 4d 61 73 68 2e 47 75 |rdID = "|$Mash.Gu|
|00004f10| 61 72 64 49 44 24 22 20 | 47 75 61 72 64 49 44 20 |ardID$" |GuardID |
|00004f20| 3d 20 22 24 47 75 61 72 | 64 49 44 20 29 3b 0d 0a |= "$Guar|dID );..|
|00004f30| 0d 0a 09 09 09 2f 2f 20 | 49 66 20 69 74 20 69 73 |.....// |If it is|
|00004f40| 20 6e 6f 20 6c 6f 6e 67 | 65 72 20 61 20 74 68 72 | no long|er a thr|
|00004f50| 65 61 74 2c 20 6f 72 20 | 69 74 20 69 73 20 6e 6f |eat, or |it is no|
|00004f60| 77 20 61 20 74 68 72 65 | 61 74 20 74 6f 20 61 20 |w a thre|at to a |
|00004f70| 64 69 66 66 65 72 65 6e | 74 20 0d 0a 09 09 09 2f |differen|t ...../|
|00004f80| 2f 20 67 75 61 72 64 20 | 70 6f 69 6e 74 2f 61 63 |/ guard |point/ac|
|00004f90| 74 6f 72 2c 20 69 74 20 | 6e 65 65 64 73 20 74 6f |tor, it |needs to|
|00004fa0| 20 72 65 6c 65 61 73 65 | 20 69 74 73 20 63 75 72 | release| its cur|
|00004fb0| 72 65 6e 74 20 67 75 61 | 72 64 20 70 6f 69 6e 74 |rent gua|rd point|
|00004fc0| 2f 61 63 74 6f 72 2e 0d | 0a 09 09 09 69 66 28 20 |/actor..|....if( |
|00004fd0| 47 75 61 72 64 49 44 20 | 3d 3d 20 63 6c 61 73 73 |GuardID |== class|
|00004fe0| 27 4d 61 73 68 61 64 61 | 72 47 75 69 64 65 27 2e |'Mashada|rGuide'.|
|00004ff0| 64 65 66 61 75 6c 74 2e | 47 75 61 72 64 49 44 20 |default.|GuardID |
|00005000| 29 0d 0a 09 09 09 7b 0d | 0a 09 09 09 09 62 53 74 |).....{.|.....bSt|
|00005010| 6f 70 47 75 61 72 64 69 | 6e 67 20 3d 20 74 72 75 |opGuardi|ng = tru|
|00005020| 65 3b 0d 0a 09 09 09 09 | 4d 61 73 68 2e 47 75 61 |e;......|Mash.Gua|
|00005030| 72 64 49 44 20 3d 20 63 | 6c 61 73 73 27 4d 61 73 |rdID = c|lass'Mas|
|00005040| 68 61 64 61 72 47 75 69 | 64 65 27 2e 64 65 66 61 |hadarGui|de'.defa|
|00005050| 75 6c 74 2e 47 75 61 72 | 64 49 44 3b 0d 0a 09 09 |ult.Guar|dID;....|
|00005060| 09 7d 0d 0a 09 09 09 65 | 6c 73 65 20 69 66 28 20 |.}.....e|lse if( |
|00005070| 4d 61 73 68 2e 47 75 61 | 72 64 49 44 20 21 3d 20 |Mash.Gua|rdID != |
|00005080| 47 75 61 72 64 49 44 20 | 29 0d 0a 09 09 09 7b 0d |GuardID |).....{.|
|00005090| 0a 09 09 09 09 62 53 74 | 6f 70 47 75 61 72 64 69 |.....bSt|opGuardi|
|000050a0| 6e 67 20 3d 20 74 72 75 | 65 3b 0d 0a 09 09 09 09 |ng = tru|e;......|
|000050b0| 52 65 6c 65 61 73 65 43 | 6c 61 69 6d 28 20 47 75 |ReleaseC|laim( Gu|
|000050c0| 61 72 64 49 44 20 29 3b | 0d 0a 09 09 09 09 4d 61 |ardID );|......Ma|
|000050d0| 73 68 2e 47 75 61 72 64 | 49 44 20 3d 20 63 6c 61 |sh.Guard|ID = cla|
|000050e0| 73 73 27 4d 61 73 68 61 | 64 61 72 47 75 69 64 65 |ss'Masha|darGuide|
|000050f0| 27 2e 64 65 66 61 75 6c | 74 2e 47 75 61 72 64 49 |'.defaul|t.GuardI|
|00005100| 44 3b 0d 0a 09 09 09 7d | 0d 0a 09 09 7d 0d 0a 09 |D;.....}|....}...|
|00005110| 7d 0d 0a 0d 0a 09 72 65 | 74 75 72 6e 20 62 53 74 |}.....re|turn bSt|
|00005120| 6f 70 47 75 61 72 64 69 | 6e 67 3b 0d 0a 7d 0d 0a |opGuardi|ng;..}..|
|00005130| 0d 0a 00 | |... | |
+--------+-------------------------+-------------------------+--------+--------+